home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Prog / U-Z / VideoToolbox 4.95.sit / VideoToolbox / VideoToolboxSources / GDVideo.c < prev    next >
MacBinary  |  1995-04-11  |  63.1 KB  |  [TEXT/MMCC]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Tue Apr 11 21:17:11 1995, modified Tue Apr 11 21:17:11 1995, creator 'MMCC', type ASCII, 61897 bytes "GDVideo.c" , at 0xf249 2452 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MMCC]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 09 47 44 56 69 64 65 | 6f 2e 63 00 00 00 00 00 |..GDVide|o.c.....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 4d 43 | 43 00 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 f1 c9 00 | 00 09 94 ab b0 da 97 ab |........|........|
|00000060| b0 da 97 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 3c c2 00 00 |........|....<...|
|00000080| 2f 2a 20 0d 47 44 56 69 | 64 65 6f 2e 63 0d 43 6f |/* .GDVi|deo.c.Co|
|00000090| 70 79 72 69 67 68 74 20 | a9 20 31 39 38 39 2d 31 |pyright |. 1989-1|
|000000a0| 39 39 34 20 44 65 6e 69 | 73 20 47 2e 20 50 65 6c |994 Deni|s G. Pel|
|000000b0| 6c 69 0d 0d 43 6f 6d 70 | 6c 65 74 65 20 73 65 74 |li..Comp|lete set|
|000000c0| 20 6f 66 20 72 6f 75 74 | 69 6e 65 73 20 74 6f 20 | of rout|ines to |
|000000d0| 63 6f 6e 74 72 6f 6c 20 | 76 69 64 65 6f 20 64 72 |control |video dr|
|000000e0| 69 76 65 72 73 20 64 69 | 72 65 63 74 6c 79 2c 20 |ivers di|rectly, |
|000000f0| 62 79 70 61 73 73 69 6e | 67 0d 51 75 69 63 6b 44 |bypassin|g.QuickD|
|00000100| 72 61 77 27 73 20 43 6f | 6c 6f 72 20 61 6e 64 20 |raw's Co|lor and |
|00000110| 50 61 6c 65 74 74 65 20 | 4d 61 6e 61 67 65 72 73 |Palette |Managers|
|00000120| 2e 20 54 68 65 72 65 20 | 69 73 20 61 20 73 65 70 |. There |is a sep|
|00000130| 61 72 61 74 65 20 66 75 | 6e 63 74 69 6f 6e 20 63 |arate fu|nction c|
|00000140| 61 6c 6c 20 66 6f 72 0d | 65 61 63 68 20 6f 66 20 |all for.|each of |
|00000150| 74 68 65 20 43 6f 6e 74 | 72 6f 6c 20 61 6e 64 20 |the Cont|rol and |
|00000160| 53 74 61 74 75 73 20 43 | 61 6c 6c 73 20 28 63 73 |Status C|alls (cs|
|00000170| 63 29 20 69 6d 70 6c 65 | 6d 65 6e 74 65 64 20 62 |c) imple|mented b|
|00000180| 79 20 76 69 64 65 6f 20 | 64 72 69 76 65 72 73 2e |y video |drivers.|
|00000190| 20 54 68 65 79 0d 61 72 | 65 20 64 65 73 63 72 69 | They.ar|e descri|
|000001a0| 62 65 64 20 69 6e 20 44 | 65 73 69 67 6e 69 6e 67 |bed in D|esigning|
|000001b0| 20 43 61 72 64 73 20 61 | 6e 64 20 44 72 69 76 65 | Cards a|nd Drive|
|000001c0| 72 73 2c 20 33 72 64 20 | 45 64 2e 2c 20 63 68 61 |rs, 3rd |Ed., cha|
|000001d0| 70 74 65 72 20 39 2e 20 | 41 20 66 65 77 20 6e 65 |pter 9. |A few ne|
|000001e0| 77 0d 63 61 6c 6c 73 20 | 61 72 65 20 64 6f 63 75 |w.calls |are docu|
|000001f0| 6d 65 6e 74 65 64 20 69 | 6e 20 74 68 65 20 44 69 |mented i|n the Di|
|00000200| 73 70 6c 61 79 20 44 65 | 76 69 63 65 20 44 72 69 |splay De|vice Dri|
|00000210| 76 65 72 20 47 75 69 64 | 65 20 44 65 76 65 6c 6f |ver Guid|e Develo|
|00000220| 70 65 72 20 4e 6f 74 65 | 2c 20 77 68 69 63 68 0d |per Note|, which.|
|00000230| 61 70 70 65 61 72 65 64 | 20 6f 6e 20 74 68 65 20 |appeared| on the |
|00000240| 4a 61 6e 75 61 72 79 20 | 27 39 34 20 44 65 76 65 |January |'94 Deve|
|00000250| 6c 6f 70 65 72 20 43 44 | 2e 0d 0d 54 68 69 73 20 |loper CD|...This |
|00000260| 66 69 6c 65 20 61 6c 73 | 6f 20 63 6f 6e 74 61 69 |file als|o contai|
|00000270| 6e 73 20 73 65 76 65 72 | 61 6c 20 6f 74 68 65 72 |ns sever|al other|
|00000280| 20 68 65 6c 70 66 75 6c | 20 72 6f 75 74 69 6e 65 | helpful| routine|
|00000290| 73 20 74 68 61 74 20 64 | 65 61 6c 20 77 69 74 68 |s that d|eal with|
|000002a0| 20 76 69 64 65 6f 0d 64 | 65 76 69 63 65 20 64 72 | video.d|evice dr|
|000002b0| 69 76 65 72 73 2e 20 46 | 6f 72 20 62 61 63 6b 67 |ivers. F|or backg|
|000002c0| 72 6f 75 6e 64 2c 20 72 | 65 61 64 20 d2 56 69 64 |round, r|ead .Vid|
|000002d0| 65 6f 20 73 79 6e 63 68 | d3 2e 0d 20 0d 54 48 45 |eo synch|... .THE|
|000002e0| 20 4d 4f 52 45 2d 55 53 | 45 46 55 4c 20 28 48 49 | MORE-US|EFUL (HI|
|000002f0| 47 48 2d 4c 45 56 45 4c | 29 20 52 4f 55 54 49 4e |GH-LEVEL|) ROUTIN|
|00000300| 45 53 3a 20 28 69 6e 20 | 61 6c 70 68 61 62 65 74 |ES: (in |alphabet|
|00000310| 69 63 61 6c 20 6f 72 64 | 65 72 29 0d 0d 63 68 61 |ical ord|er)..cha|
|00000320| 72 20 2a 47 44 43 61 72 | 64 4e 61 6d 65 28 47 44 |r *GDCar|dName(GD|
|00000330| 48 61 6e 64 6c 65 20 64 | 65 76 69 63 65 29 3b 0d |Handle d|evice);.|
|00000340| 52 65 74 75 72 6e 73 20 | 74 68 65 20 61 64 64 72 |Returns |the addr|
|00000350| 65 73 73 20 6f 66 20 61 | 20 43 20 73 74 72 69 6e |ess of a| C strin|
|00000360| 67 20 63 6f 6e 74 61 69 | 6e 69 6e 67 20 74 68 65 |g contai|ning the|
|00000370| 20 6e 61 6d 65 20 6f 66 | 20 74 68 65 20 76 69 64 | name of| the vid|
|00000380| 65 6f 20 63 61 72 64 2e | 20 59 6f 75 0d 73 68 6f |eo card.| You.sho|
|00000390| 75 6c 64 20 63 61 6c 6c | 20 44 69 73 70 6f 73 65 |uld call| Dispose|
|000003a0| 50 74 72 28 29 20 6f 6e | 20 74 68 65 20 72 65 74 |Ptr() on| the ret|
|000003b0| 75 72 6e 65 64 20 73 74 | 72 69 6e 67 20 77 68 65 |urned st|ring whe|
|000003c0| 6e 20 79 6f 75 20 6e 6f | 20 6c 6f 6e 67 65 72 20 |n you no| longer |
|000003d0| 6e 65 65 64 20 69 74 2e | 0d 54 61 6b 65 73 20 61 |need it.|.Takes a|
|000003e0| 62 6f 75 74 20 31 2e 35 | 20 6d 73 20 62 65 63 61 |bout 1.5| ms beca|
|000003f0| 75 73 65 20 41 70 70 6c | 65 27 73 20 73 6c 6f 74 |use Appl|e's slot|
|00000400| 20 72 6f 75 74 69 6e 65 | 73 20 61 72 65 20 76 65 | routine|s are ve|
|00000410| 72 79 20 73 6c 6f 77 2e | 20 0d 0d 73 68 6f 72 74 |ry slow.| ..short|
|00000420| 20 47 44 43 6c 75 74 53 | 69 7a 65 28 47 44 48 61 | GDClutS|ize(GDHa|
|00000430| 6e 64 6c 65 20 64 65 76 | 69 63 65 29 3b 0d 52 65 |ndle dev|ice);.Re|
|00000440| 74 75 72 6e 73 20 74 68 | 65 20 6e 75 6d 62 65 72 |turns th|e number|
|00000450| 20 6f 66 20 65 6e 74 72 | 69 65 73 20 69 6e 20 74 | of entr|ies in t|
|00000460| 68 65 20 76 69 64 65 6f | 20 64 72 69 76 65 72 27 |he video| driver'|
|00000470| 73 20 63 6c 75 74 20 69 | 6e 20 74 68 65 20 63 75 |s clut i|n the cu|
|00000480| 72 72 65 6e 74 20 76 69 | 64 65 6f 0d 6d 6f 64 65 |rrent vi|deo.mode|
|00000490| 20 28 69 2e 65 2e 20 63 | 75 72 72 65 6e 74 20 70 | (i.e. c|urrent p|
|000004a0| 69 78 65 6c 20 73 69 7a | 65 29 2e 20 56 69 64 65 |ixel siz|e). Vide|
|000004b0| 6f 54 6f 6f 6c 62 6f 78 | 2e 68 20 64 65 66 69 6e |oToolbox|.h defin|
|000004c0| 65 73 20 61 20 70 72 65 | 70 72 6f 63 65 73 73 6f |es a pre|processo|
|000004d0| 72 20 6d 61 63 72 6f 0d | 47 44 43 4c 55 54 53 49 |r macro.|GDCLUTSI|
|000004e0| 5a 45 28 64 65 76 69 63 | 65 29 20 74 68 61 74 20 |ZE(devic|e) that |
|000004f0| 65 78 70 61 6e 64 73 20 | 74 6f 20 65 71 75 69 76 |expands |to equiv|
|00000500| 61 6c 65 6e 74 20 69 6e | 6c 69 6e 65 20 63 6f 64 |alent in|line cod|
|00000510| 65 2e 0d 0d 6c 6f 6e 67 | 20 47 44 43 6f 6c 6f 72 |e...long| GDColor|
|00000520| 73 28 47 44 48 61 6e 64 | 6c 65 20 64 65 76 69 63 |s(GDHand|le devic|
|00000530| 65 29 0d 4e 75 6d 62 65 | 72 20 6f 66 20 63 6f 6c |e).Numbe|r of col|
|00000540| 6f 72 73 2c 20 69 6e 20 | 74 68 65 20 63 75 72 72 |ors, in |the curr|
|00000550| 65 6e 74 20 6d 6f 64 65 | 2e 0d 0d 73 68 6f 72 74 |ent mode|...short|
|00000560| 20 47 44 44 61 63 53 69 | 7a 65 28 47 44 48 61 6e | GDDacSi|ze(GDHan|
|00000570| 64 6c 65 20 64 65 76 69 | 63 65 29 0d 46 69 67 75 |dle devi|ce).Figu|
|00000580| 72 65 73 20 6f 75 74 20 | 68 6f 77 20 6d 61 6e 79 |res out |how many|
|00000590| 20 62 69 74 73 20 69 6e | 20 74 68 65 20 76 69 64 | bits in| the vid|
|000005a0| 65 6f 20 64 61 63 2e 0d | 0d 4f 53 45 72 72 20 47 |eo dac..|.OSErr G|
|000005b0| 44 47 65 74 44 69 73 70 | 6c 61 79 4d 6f 64 65 28 |DGetDisp|layMode(|
|000005c0| 47 44 48 61 6e 64 6c 65 | 20 64 65 76 69 63 65 2c |GDHandle| device,|
|000005d0| 75 6e 73 69 67 6e 65 64 | 20 6c 6f 6e 67 20 2a 64 |unsigned| long *d|
|000005e0| 69 73 70 6c 61 79 4d 6f | 64 65 49 44 50 74 72 0d |isplayMo|deIDPtr.|
|000005f0| 09 2c 75 6e 73 69 67 6e | 65 64 20 73 68 6f 72 74 |.,unsign|ed short|
|00000600| 20 2a 6d 6f 64 65 50 74 | 72 2c 75 6e 73 69 67 6e | *modePt|r,unsign|
|00000610| 65 64 20 73 68 6f 72 74 | 20 2a 70 61 67 65 50 74 |ed short| *pagePt|
|00000620| 72 2c 50 74 72 20 2a 62 | 61 73 65 41 64 64 72 50 |r,Ptr *b|aseAddrP|
|00000630| 74 72 29 3b 0d 43 61 6c | 6c 73 20 63 73 63 47 65 |tr);.Cal|ls cscGe|
|00000640| 74 43 75 72 4d 6f 64 65 | 2c 20 64 6f 63 75 6d 65 |tCurMode|, docume|
|00000650| 6e 74 65 64 20 69 6e 20 | 41 70 70 6c 65 27 73 20 |nted in |Apple's |
|00000660| 6e 65 77 20 44 69 73 70 | 6c 61 79 20 44 65 76 69 |new Disp|lay Devi|
|00000670| 63 65 20 44 72 69 76 65 | 72 20 47 75 69 64 65 0d |ce Drive|r Guide.|
|00000680| 44 65 76 65 6c 6f 70 65 | 72 20 4e 6f 74 65 20 6f |Develope|r Note o|
|00000690| 6e 20 74 68 65 20 4a 61 | 6e 75 61 72 79 20 27 39 |n the Ja|nuary '9|
|000006a0| 34 20 44 65 76 65 6c 6f | 70 65 72 20 43 44 2e 20 |4 Develo|per CD. |
|000006b0| 54 68 65 20 22 64 69 73 | 70 6c 61 79 20 6d 6f 64 |The "dis|play mod|
|000006c0| 65 20 49 44 22 20 69 73 | 20 61 20 6e 65 77 0d 70 |e ID" is| a new.p|
|000006d0| 61 72 61 6d 65 74 65 72 | 2c 20 74 6f 20 73 75 70 |arameter|, to sup|
|000006e0| 70 6f 72 74 20 6d 75 6c | 74 69 2d 72 65 73 6f 6c |port mul|ti-resol|
|000006f0| 75 74 69 6f 6e 20 64 69 | 73 70 6c 61 79 73 2e 20 |ution di|splays. |
|00000700| 45 61 63 68 20 64 69 73 | 70 6c 61 79 20 6d 6f 64 |Each dis|play mod|
|00000710| 65 20 6d 61 79 20 68 61 | 76 65 0d 6d 75 6c 74 69 |e may ha|ve.multi|
|00000720| 70 6c 65 20 70 69 78 65 | 6c 20 64 65 70 74 68 73 |ple pixe|l depths|
|00000730| 20 28 77 68 69 63 68 2c | 20 63 6f 6e 66 75 73 69 | (which,| confusi|
|00000740| 6e 67 6c 79 2c 20 68 61 | 76 65 20 61 6c 73 6f 20 |ngly, ha|ve also |
|00000750| 62 65 65 6e 20 63 61 6c | 6c 65 64 20 22 6d 6f 64 |been cal|led "mod|
|00000760| 65 73 22 29 2e 20 54 68 | 69 73 0d 63 61 6c 6c 20 |es"). Th|is.call |
|00000770| 77 69 6c 6c 20 6f 6e 6c | 79 20 62 65 20 75 73 65 |will onl|y be use|
|00000780| 66 75 6c 20 69 66 20 74 | 68 65 20 44 69 73 70 6c |ful if t|he Displ|
|00000790| 61 79 20 4d 61 6e 61 67 | 65 72 20 69 73 20 70 72 |ay Manag|er is pr|
|000007a0| 65 73 65 6e 74 20 28 72 | 65 71 75 69 72 65 73 20 |esent (r|equires |
|000007b0| 50 6f 77 65 72 50 43 20 | 6f 72 0d 53 79 73 74 65 |PowerPC |or.Syste|
|000007c0| 6d 20 37 2e 35 29 20 61 | 6e 64 20 69 66 20 79 6f |m 7.5) a|nd if yo|
|000007d0| 75 27 72 65 20 75 73 69 | 6e 67 20 74 68 65 20 44 |u're usi|ng the D|
|000007e0| 69 73 70 6c 61 79 20 4d | 61 6e 61 67 65 72 2c 20 |isplay M|anager, |
|000007f0| 77 68 69 63 68 20 69 73 | 20 64 6f 63 75 6d 65 6e |which is| documen|
|00000800| 74 65 64 20 69 6e 20 61 | 0d 63 68 61 70 74 65 72 |ted in a|.chapter|
|00000810| 20 69 6e 20 49 6e 73 69 | 64 65 20 4d 61 63 69 6e | in Insi|de Macin|
|00000820| 74 6f 73 68 3a 41 64 76 | 61 6e 63 65 64 20 43 6f |tosh:Adv|anced Co|
|00000830| 6c 6f 72 20 49 6d 61 67 | 69 6e 67 2c 20 77 68 69 |lor Imag|ing, whi|
|00000840| 63 68 20 74 68 75 73 20 | 66 61 72 20 68 61 73 20 |ch thus |far has |
|00000850| 61 70 70 65 61 72 65 64 | 0d 6f 6e 6c 79 20 69 6e |appeared|.only in|
|00000860| 20 64 72 61 66 74 20 66 | 6f 72 6d 20 6f 6e 20 74 | draft f|orm on t|
|00000870| 68 65 20 44 65 63 65 6d | 62 65 72 20 27 39 34 20 |he Decem|ber '94 |
|00000880| 44 65 76 65 6c 6f 70 65 | 72 20 43 44 2e 20 54 68 |Develope|r CD. Th|
|00000890| 65 20 63 61 6c 6c 20 72 | 65 74 75 72 6e 73 20 61 |e call r|eturns a|
|000008a0| 6e 20 65 72 72 6f 72 0d | 69 66 20 74 68 65 20 76 |n error.|if the v|
|000008b0| 69 64 65 6f 20 64 72 69 | 76 65 72 20 64 6f 65 73 |ideo dri|ver does|
|000008c0| 20 6e 6f 74 20 73 75 70 | 70 6f 72 74 20 74 68 65 | not sup|port the|
|000008d0| 20 44 69 73 70 6c 61 79 | 20 4d 61 6e 61 67 65 72 | Display| Manager|
|000008e0| 2e 20 55 4e 54 45 53 54 | 45 44 21 21 0d 0d 4f 53 |. UNTEST|ED!!..OS|
|000008f0| 45 72 72 20 47 44 47 65 | 74 45 6e 74 72 69 65 73 |Err GDGe|tEntries|
|00000900| 28 47 44 48 61 6e 64 6c | 65 20 64 65 76 69 63 65 |(GDHandl|e device|
|00000910| 2c 73 68 6f 72 74 20 73 | 74 61 72 74 2c 73 68 6f |,short s|tart,sho|
|00000920| 72 74 20 63 6f 75 6e 74 | 2c 43 6f 6c 6f 72 53 70 |rt count|,ColorSp|
|00000930| 65 63 20 2a 74 61 62 6c | 65 29 3b 0d 43 61 6c 6c |ec *tabl|e);.Call|
|00000940| 73 20 63 73 63 47 65 74 | 45 6e 74 72 69 65 73 2e |s cscGet|Entries.|
|00000950| 20 54 68 69 73 20 69 73 | 20 6d 75 63 68 20 61 73 | This is| much as|
|00000960| 20 79 6f 75 27 64 20 65 | 78 70 65 63 74 20 61 66 | you'd e|xpect af|
|00000970| 74 65 72 20 72 65 61 64 | 69 6e 67 20 47 44 53 65 |ter read|ing GDSe|
|00000980| 74 45 6e 74 72 69 65 73 | 0d 62 65 6c 6f 77 2e 20 |tEntries|.below. |
|00000990| 4e 6f 74 65 20 74 68 61 | 74 20 75 6e 6c 65 73 73 |Note tha|t unless|
|000009a0| 20 74 68 65 20 67 61 6d | 6d 61 20 74 61 62 6c 65 | the gam|ma table|
|000009b0| 20 69 73 20 6c 69 6e 65 | 61 72 2c 20 74 68 65 20 | is line|ar, the |
|000009c0| 76 61 6c 75 65 73 20 72 | 65 74 75 72 6e 65 64 20 |values r|eturned |
|000009d0| 6d 61 79 20 6e 6f 74 0d | 62 65 20 74 68 65 20 73 |may not.|be the s|
|000009e0| 61 6d 65 20 61 73 20 74 | 68 6f 73 65 20 6f 72 69 |ame as t|hose ori|
|000009f0| 67 69 6e 61 6c 6c 79 20 | 70 61 73 73 65 64 20 62 |ginally |passed b|
|00000a00| 79 20 47 44 53 65 74 45 | 6e 74 72 69 65 73 2e 20 |y GDSetE|ntries. |
|00000a10| 53 6f 20 63 61 6c 6c 0d | 47 44 55 6e 63 6f 72 72 |So call.|GDUncorr|
|00000a20| 65 63 74 65 64 47 61 6d | 6d 61 20 66 69 72 73 74 |ectedGam|ma first|
|00000a30| 2e 20 54 72 79 20 74 68 | 65 20 64 65 6d 6f 20 54 |. Try th|e demo T|
|00000a40| 69 6d 65 56 69 64 65 6f | 2e 0d 0d 4f 53 45 72 72 |imeVideo|...OSErr|
|00000a50| 20 47 44 47 65 74 47 61 | 6d 6d 61 28 47 44 48 61 | GDGetGa|mma(GDHa|
|00000a60| 6e 64 6c 65 20 64 65 76 | 69 63 65 2c 47 61 6d 6d |ndle dev|ice,Gamm|
|00000a70| 61 54 62 6c 20 2a 2a 6d | 79 47 61 6d 6d 61 54 62 |aTbl **m|yGammaTb|
|00000a80| 6c 48 61 6e 64 6c 65 29 | 3b 0d 43 61 6c 6c 73 20 |lHandle)|;.Calls |
|00000a90| 63 73 63 47 65 74 47 61 | 6d 6d 61 2e 20 52 65 74 |cscGetGa|mma. Ret|
|00000aa0| 75 72 6e 73 20 61 20 70 | 6f 69 6e 74 65 72 20 74 |urns a p|ointer t|
|00000ab0| 6f 20 74 68 65 20 47 61 | 6d 6d 61 20 74 61 62 6c |o the Ga|mma tabl|
|00000ac0| 65 20 69 6e 20 74 68 65 | 20 73 70 65 63 69 66 69 |e in the| specifi|
|00000ad0| 65 64 20 76 69 64 65 6f | 0d 64 65 76 69 63 65 2e |ed video|.device.|
|00000ae0| 20 28 49 2e 65 2e 20 79 | 6f 75 20 70 61 73 73 20 | (I.e. y|ou pass |
|00000af0| 69 74 20 61 20 70 6f 69 | 6e 74 65 72 20 74 6f 20 |it a poi|nter to |
|00000b00| 79 6f 75 72 20 70 6f 69 | 6e 74 65 72 2c 20 61 20 |your poi|nter, a |
|00000b10| 68 61 6e 64 6c 65 2c 20 | 77 68 69 63 68 20 69 74 |handle, |which it|
|00000b20| 20 75 73 65 73 20 74 6f | 0d 6c 6f 61 64 20 79 6f | uses to|.load yo|
|00000b30| 75 72 20 70 6f 69 6e 74 | 65 72 2e 29 0d 0d 4f 53 |ur point|er.)..OS|
|00000b40| 45 72 72 20 47 44 47 65 | 74 50 61 67 65 43 6e 74 |Err GDGe|tPageCnt|
|00000b50| 28 47 44 48 61 6e 64 6c | 65 20 64 65 76 69 63 65 |(GDHandl|e device|
|00000b60| 2c 73 68 6f 72 74 20 6d | 6f 64 65 2c 73 68 6f 72 |,short m|ode,shor|
|00000b70| 74 20 2a 70 61 67 65 73 | 50 74 72 29 3b 0d 43 61 |t *pages|Ptr);.Ca|
|00000b80| 6c 6c 73 20 63 73 63 47 | 65 74 50 61 67 65 43 6e |lls cscG|etPageCn|
|00000b90| 74 2e 20 43 61 6c 6c 65 | 64 20 22 47 65 74 50 61 |t. Calle|d "GetPa|
|00000ba0| 67 65 73 22 20 69 6e 20 | 44 65 73 69 67 6e 69 6e |ges" in |Designin|
|00000bb0| 67 20 43 61 72 64 73 20 | 61 6e 64 20 44 72 69 76 |g Cards |and Driv|
|00000bc0| 65 72 73 2c 20 33 72 64 | 20 45 64 2e 0d 59 6f 75 |ers, 3rd| Ed..You|
|00000bd0| 20 74 65 6c 6c 20 69 74 | 20 77 68 69 63 68 20 6d | tell it| which m|
|00000be0| 6f 64 65 20 79 6f 75 27 | 72 65 20 69 6e 74 65 72 |ode you'|re inter|
|00000bf0| 65 73 74 65 64 20 69 6e | 2e 20 49 74 20 74 65 6c |ested in|. It tel|
|00000c00| 6c 73 20 79 6f 75 20 68 | 6f 77 20 6d 61 6e 79 20 |ls you h|ow many |
|00000c10| 70 61 67 65 73 20 6f 66 | 0d 76 69 64 65 6f 20 72 |pages of|.video r|
|00000c20| 61 6d 20 61 72 65 20 61 | 76 61 69 6c 61 62 6c 65 |am are a|vailable|
|00000c30| 20 69 6e 20 74 68 61 74 | 20 6d 6f 64 65 2e 0d 0d | in that| mode...|
|00000c40| 42 6f 6f 6c 65 61 6e 20 | 47 44 48 61 73 4d 6f 64 |Boolean |GDHasMod|
|00000c50| 65 28 47 44 48 61 6e 64 | 6c 65 20 64 65 76 69 63 |e(GDHand|le devic|
|00000c60| 65 2c 73 68 6f 72 74 20 | 6d 6f 64 65 2c 73 68 6f |e,short |mode,sho|
|00000c70| 72 74 20 2a 70 69 78 65 | 6c 53 69 7a 65 50 74 72 |rt *pixe|lSizePtr|
|00000c80| 2c 73 68 6f 72 74 20 2a | 70 61 67 65 73 50 74 72 |,short *|pagesPtr|
|00000c90| 29 3b 0d 52 65 74 75 72 | 6e 73 20 30 20 69 66 20 |);.Retur|ns 0 if |
|00000ca0| 6e 6f 20 73 75 63 68 20 | 76 69 64 65 6f 20 6d 6f |no such |video mo|
|00000cb0| 64 65 2c 20 72 65 74 75 | 72 6e 73 20 31 20 69 66 |de, retu|rns 1 if|
|00000cc0| 20 6d 6f 64 65 20 69 73 | 20 61 76 61 69 6c 61 62 | mode is| availab|
|00000cd0| 6c 65 2e 0d 49 66 20 70 | 69 78 65 6c 53 69 7a 65 |le..If p|ixelSize|
|00000ce0| 50 74 72 20 69 73 20 6e | 6f 74 20 4e 55 4c 4c 2c |Ptr is n|ot NULL,|
|00000cf0| 20 74 68 65 6e 20 73 65 | 74 73 20 2a 70 69 78 65 | then se|ts *pixe|
|00000d00| 6c 53 69 7a 65 50 74 72 | 20 74 6f 20 70 69 78 65 |lSizePtr| to pixe|
|00000d10| 6c 53 69 7a 65 20 6f 72 | 20 2d 31 20 69 66 20 75 |lSize or| -1 if u|
|00000d20| 6e 6b 6e 6f 77 6e 2e 0d | 49 66 20 70 61 67 65 73 |nknown..|If pages|
|00000d30| 50 74 72 20 69 73 20 6e | 6f 74 20 4e 55 4c 4c 2c |Ptr is n|ot NULL,|
|00000d40| 20 74 68 65 6e 20 73 65 | 74 73 20 2a 70 61 67 65 | then se|ts *page|
|00000d50| 73 50 74 72 20 74 6f 20 | 70 61 67 65 73 2e 0d 0d |sPtr to |pages...|
|00000d60| 75 6e 73 69 67 6e 65 64 | 20 63 68 61 72 20 2a 47 |unsigned| char *G|
|00000d70| 44 4e 61 6d 65 28 47 44 | 48 61 6e 64 6c 65 20 64 |DName(GD|Handle d|
|00000d80| 65 76 69 63 65 29 3b 0d | 52 65 74 75 72 6e 73 20 |evice);.|Returns |
|00000d90| 61 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 74 68 65 |a pointe|r to the|
|00000da0| 20 6e 61 6d 65 20 6f 66 | 20 74 68 65 20 64 72 69 | name of| the dri|
|00000db0| 76 65 72 20 28 61 20 70 | 61 73 63 61 6c 20 73 74 |ver (a p|ascal st|
|00000dc0| 72 69 6e 67 29 2e 20 54 | 68 69 73 20 69 73 20 71 |ring). T|his is q|
|00000dd0| 75 69 63 6b 2e 0d 54 68 | 65 20 73 74 72 69 6e 67 |uick..Th|e string|
|00000de0| 20 69 73 20 70 61 72 74 | 20 6f 66 20 74 68 65 20 | is part| of the |
|00000df0| 64 72 69 76 65 72 20 69 | 74 73 65 6c 66 2c 20 73 |driver i|tself, s|
|00000e00| 6f 20 64 6f 6e 27 74 20 | 6d 6f 64 69 66 79 20 69 |o don't |modify i|
|00000e10| 74 20 6f 72 20 74 72 79 | 20 74 6f 20 64 69 73 70 |t or try| to disp|
|00000e20| 6f 73 65 20 6f 66 20 69 | 74 2e 0d 0d 75 6e 73 69 |ose of i|t...unsi|
|00000e30| 67 6e 65 64 20 63 68 61 | 72 20 2a 47 44 4e 61 6d |gned cha|r *GDNam|
|00000e40| 65 53 74 72 28 47 44 48 | 61 6e 64 6c 65 20 64 65 |eStr(GDH|andle de|
|00000e50| 76 69 63 65 29 3b 0d 52 | 65 74 75 72 6e 73 20 61 |vice);.R|eturns a|
|00000e60| 20 70 6f 69 6e 74 65 72 | 20 74 6f 20 74 68 65 20 | pointer| to the |
|00000e70| 6e 61 6d 65 20 6f 66 20 | 74 68 65 20 64 72 69 76 |name of |the driv|
|00000e80| 65 72 2c 20 61 73 20 61 | 20 43 20 73 74 72 69 6e |er, as a| C strin|
|00000e90| 67 2e 20 0d 54 68 65 20 | 73 74 72 69 6e 67 20 69 |g. .The |string i|
|00000ea0| 73 20 73 74 61 74 69 63 | 2c 20 61 6e 64 20 77 69 |s static|, and wi|
|00000eb0| 6c 6c 20 62 65 20 6f 76 | 65 72 77 72 69 74 74 65 |ll be ov|erwritte|
|00000ec0| 6e 20 62 79 20 74 68 65 | 20 6e 65 78 74 20 63 61 |n by the| next ca|
|00000ed0| 6c 6c 20 74 6f 20 47 44 | 4e 61 6d 65 53 74 72 28 |ll to GD|NameStr(|
|00000ee0| 29 2e 0d 0d 43 6f 6c 6f | 72 53 70 65 63 20 2a 47 |)...Colo|rSpec *G|
|00000ef0| 44 4e 65 77 4c 69 6e 65 | 61 72 43 6f 6c 6f 72 54 |DNewLine|arColorT|
|00000f00| 61 62 6c 65 28 47 44 48 | 61 6e 64 6c 65 20 64 65 |able(GDH|andle de|
|00000f10| 76 69 63 65 29 3b 0d 43 | 72 65 61 74 65 73 20 61 |vice);.C|reates a|
|00000f20| 20 64 65 66 61 75 6c 74 | 20 74 61 62 6c 65 20 66 | default| table f|
|00000f30| 6f 72 20 75 73 65 20 77 | 68 65 6e 20 67 64 54 79 |or use w|hen gdTy|
|00000f40| 70 65 3d 3d 64 69 72 65 | 63 74 54 79 70 65 2e 0d |pe==dire|ctType..|
|00000f50| 0d 4f 53 45 72 72 20 47 | 44 50 72 69 6e 74 47 61 |.OSErr G|DPrintGa|
|00000f60| 6d 6d 61 54 61 62 6c 65 | 28 46 49 4c 45 20 2a 6f |mmaTable|(FILE *o|
|00000f70| 2c 47 44 48 61 6e 64 6c | 65 20 64 65 76 69 63 65 |,GDHandl|e device|
|00000f80| 29 3b 0d 0d 4f 53 45 72 | 72 20 47 44 52 65 73 74 |);..OSEr|r GDRest|
|00000f90| 6f 72 65 44 65 76 69 63 | 65 43 6c 75 74 28 47 44 |oreDevic|eClut(GD|
|00000fa0| 48 61 6e 64 6c 65 20 64 | 65 76 69 63 65 29 3b 0d |Handle d|evice);.|
|00000fb0| 4e 6f 6d 69 6e 61 6c 6c | 79 20 65 71 75 69 76 61 |Nominall|y equiva|
|00000fc0| 6c 65 6e 74 20 74 6f 20 | 41 70 70 6c 65 27 73 20 |lent to |Apple's |
|00000fd0| 52 65 73 74 6f 72 65 44 | 65 76 69 63 65 43 6c 75 |RestoreD|eviceClu|
|00000fe0| 74 28 29 2c 20 77 68 69 | 63 68 20 69 73 20 6f 6e |t(), whi|ch is on|
|00000ff0| 6c 79 20 61 76 61 69 6c | 61 62 6c 65 0d 73 69 6e |ly avail|able.sin|
|00001000| 63 65 20 53 79 73 74 65 | 6d 20 36 2e 30 35 2e 20 |ce Syste|m 6.05. |
|00001010| 48 6f 77 65 76 65 72 2c | 20 49 20 66 69 6e 64 20 |However,| I find |
|00001020| 74 68 61 74 20 41 70 70 | 6c 65 27 73 20 72 6f 75 |that App|le's rou|
|00001030| 74 69 6e 65 20 73 6f 6d | 65 74 69 6d 65 73 20 64 |tine som|etimes d|
|00001040| 6f 65 73 20 6e 6f 74 68 | 69 6e 67 2c 0d 77 68 65 |oes noth|ing,.whe|
|00001050| 72 65 61 73 20 74 68 69 | 73 20 72 6f 75 74 69 6e |reas thi|s routin|
|00001060| 65 20 61 6c 77 61 79 73 | 20 77 6f 72 6b 73 2e 20 |e always| works. |
|00001070| 50 61 73 73 69 6e 67 20 | 61 20 4e 55 4c 4c 20 61 |Passing |a NULL a|
|00001080| 72 67 75 6d 65 6e 74 20 | 63 61 75 73 65 73 20 72 |rgument |causes r|
|00001090| 65 73 74 6f 72 61 74 69 | 6f 6e 20 6f 66 0d 63 6c |estorati|on of.cl|
|000010a0| 75 74 73 20 6f 66 20 61 | 6c 6c 20 76 69 64 65 6f |uts of a|ll video|
|000010b0| 20 64 65 76 69 63 65 73 | 2e 0d 0d 4f 53 45 72 72 | devices|...OSErr|
|000010c0| 20 47 44 53 61 76 65 47 | 61 6d 6d 61 28 47 44 48 | GDSaveG|amma(GDH|
|000010d0| 61 6e 64 6c 65 20 64 65 | 76 69 63 65 29 3b 0d 4f |andle de|vice);.O|
|000010e0| 53 45 72 72 20 47 44 52 | 65 73 74 6f 72 65 47 61 |SErr GDR|estoreGa|
|000010f0| 6d 6d 61 28 47 44 48 61 | 6e 64 6c 65 20 64 65 76 |mma(GDHa|ndle dev|
|00001100| 69 63 65 29 3b 0d 55 73 | 65 20 61 6e 20 69 6e 74 |ice);.Us|e an int|
|00001110| 65 72 6e 61 6c 20 63 61 | 63 68 65 20 74 6f 20 73 |ernal ca|che to s|
|00001120| 61 76 65 20 61 6e 64 20 | 72 65 73 74 6f 72 65 20 |ave and |restore |
|00001130| 74 68 65 20 64 65 76 69 | 63 65 27 73 20 67 61 6d |the devi|ce's gam|
|00001140| 6d 61 2d 63 6f 72 72 65 | 63 74 69 6f 6e 20 74 61 |ma-corre|ction ta|
|00001150| 62 6c 65 2e 20 43 61 6c | 6c 0d 47 44 52 65 73 74 |ble. Cal|l.GDRest|
|00001160| 6f 72 65 47 61 6d 6d 61 | 20 62 65 66 6f 72 65 20 |oreGamma| before |
|00001170| 47 44 52 65 73 74 6f 72 | 65 44 65 76 69 63 65 43 |GDRestor|eDeviceC|
|00001180| 6c 75 74 2e 0d 0d 4f 53 | 45 72 72 20 47 44 53 65 |lut...OS|Err GDSe|
|00001190| 74 45 6e 74 72 69 65 73 | 28 47 44 48 61 6e 64 6c |tEntries|(GDHandl|
|000011a0| 65 20 64 65 76 69 63 65 | 2c 73 68 6f 72 74 20 73 |e device|,short s|
|000011b0| 74 61 72 74 2c 73 68 6f | 72 74 20 63 6f 75 6e 74 |tart,sho|rt count|
|000011c0| 2c 43 6f 6c 6f 72 53 70 | 65 63 20 2a 74 61 62 6c |,ColorSp|ec *tabl|
|000011d0| 65 29 3b 0d 44 6f 65 73 | 20 61 20 63 73 63 53 65 |e);.Does| a cscSe|
|000011e0| 74 45 6e 74 72 69 65 73 | 20 63 61 6c 6c 20 74 6f |tEntries| call to|
|000011f0| 20 74 68 65 20 76 69 64 | 65 6f 20 63 61 72 64 27 | the vid|eo card'|
|00001200| 73 20 64 72 69 76 65 72 | 2c 20 6c 6f 61 64 69 6e |s driver|, loadin|
|00001210| 67 20 61 6e 79 0d 6e 75 | 6d 62 65 72 20 6f 66 20 |g any.nu|mber of |
|00001220| 63 6c 75 74 20 65 6e 74 | 72 69 65 73 20 77 69 74 |clut ent|ries wit|
|00001230| 68 20 61 72 62 69 74 72 | 61 72 79 20 72 67 62 20 |h arbitr|ary rgb |
|00001240| 74 72 69 70 6c 65 74 73 | 2e 20 28 4e 6f 74 65 20 |triplets|. (Note |
|00001250| 74 68 61 74 20 74 68 65 | 20 64 72 69 76 65 72 20 |that the| driver |
|00001260| 77 69 6c 6c 0d 74 72 61 | 6e 73 66 6f 72 6d 20 79 |will.tra|nsform y|
|00001270| 6f 75 72 20 72 67 62 20 | 74 72 69 70 6c 65 74 73 |our rgb |triplets|
|00001280| 20 76 69 61 20 74 68 65 | 20 67 61 6d 6d 61 20 74 | via the| gamma t|
|00001290| 61 62 6c 65 20 62 65 66 | 6f 72 65 20 6c 6f 61 64 |able bef|ore load|
|000012a0| 69 6e 67 20 74 68 65 6d | 20 69 6e 74 6f 20 74 68 |ing them| into th|
|000012b0| 65 0d 63 6c 75 74 3b 20 | 73 6f 20 63 61 6c 6c 20 |e.clut; |so call |
|000012c0| 47 44 55 6e 63 6f 72 72 | 65 63 74 65 64 47 61 6d |GDUncorr|ectedGam|
|000012d0| 6d 61 20 66 69 72 73 74 | 2e 29 20 22 64 65 76 69 |ma first|.) "devi|
|000012e0| 63 65 22 20 73 70 65 63 | 69 66 69 65 73 20 77 68 |ce" spec|ifies wh|
|000012f0| 69 63 68 20 76 69 64 65 | 6f 20 64 65 76 69 63 65 |ich vide|o device|
|00001300| 27 73 0d 63 6c 75 74 20 | 79 6f 75 20 77 61 6e 74 |'s.clut |you want|
|00001310| 20 74 6f 20 6c 6f 61 64 | 2e 20 22 73 74 61 72 74 | to load|. "start|
|00001320| 22 20 69 73 20 65 69 74 | 68 65 72 20 69 6e 20 74 |" is eit|her in t|
|00001330| 68 65 20 72 61 6e 67 65 | 20 30 20 74 6f 20 63 6c |he range| 0 to cl|
|00001340| 75 74 53 69 7a 65 2d 31 | 2c 0d 69 6e 64 69 63 61 |utSize-1|,.indica|
|00001350| 74 69 6e 67 20 77 68 69 | 63 68 20 63 6c 75 74 20 |ting whi|ch clut |
|00001360| 65 6e 74 72 79 20 74 6f | 20 6c 6f 61 64 20 66 69 |entry to| load fi|
|00001370| 72 73 74 20 28 69 6e 20 | 22 73 65 71 75 65 6e 63 |rst (in |"sequenc|
|00001380| 65 20 6d 6f 64 65 22 29 | 2c 20 6f 72 20 69 73 20 |e mode")|, or is |
|00001390| 2d 31 0d 28 72 65 71 75 | 65 73 74 69 6e 67 20 22 |-1.(requ|esting "|
|000013a0| 69 6e 64 65 78 20 6d 6f | 64 65 22 29 2e 20 22 63 |index mo|de"). "c|
|000013b0| 6f 75 6e 74 22 20 69 73 | 20 74 68 65 20 6e 75 6d |ount" is| the num|
|000013c0| 62 65 72 20 6f 66 20 65 | 6e 74 72 69 65 73 20 74 |ber of e|ntries t|
|000013d0| 6f 20 62 65 20 6d 6f 64 | 69 66 69 65 64 2c 0d 6d |o be mod|ified,.m|
|000013e0| 69 6e 75 73 20 31 2e 20 | 22 74 61 62 6c 65 22 20 |inus 1. |"table" |
|000013f0| 69 73 20 61 20 43 6f 6c | 6f 72 53 70 65 63 20 61 |is a Col|orSpec a|
|00001400| 72 72 61 79 20 28 6e 6f | 74 20 61 20 43 6f 6c 6f |rray (no|t a Colo|
|00001410| 72 54 61 62 6c 65 29 20 | 63 6f 6e 74 61 69 6e 69 |rTable) |containi|
|00001420| 6e 67 20 74 68 65 20 72 | 67 62 0d 74 72 69 70 6c |ng the r|gb.tripl|
|00001430| 65 74 73 20 74 68 61 74 | 20 79 6f 75 20 77 61 6e |ets that| you wan|
|00001440| 74 20 74 6f 20 6c 6f 61 | 64 20 69 6e 74 6f 20 74 |t to loa|d into t|
|00001450| 68 65 20 63 6c 75 74 2e | 20 49 6e 20 73 65 71 75 |he clut.| In sequ|
|00001460| 65 6e 63 65 20 6d 6f 64 | 65 20 22 73 74 61 72 74 |ence mod|e "start|
|00001470| 22 20 6d 75 73 74 20 62 | 65 0d 69 6e 20 74 68 65 |" must b|e.in the|
|00001480| 20 72 61 6e 67 65 20 30 | 20 74 6f 20 63 6c 75 74 | range 0| to clut|
|00001490| 53 69 7a 65 2d 31 2c 20 | 74 68 65 20 69 2d 74 68 |Size-1, |the i-th|
|000014a0| 20 65 6c 65 6d 65 6e 74 | 20 6f 66 20 74 61 62 6c | element| of tabl|
|000014b0| 65 20 63 6f 72 72 65 73 | 70 6f 6e 64 73 20 74 6f |e corres|ponds to|
|000014c0| 20 74 68 65 0d 69 2b 73 | 74 61 72 74 20 65 6e 74 | the.i+s|tart ent|
|000014d0| 72 79 20 69 6e 20 74 68 | 65 20 63 6c 75 74 2c 20 |ry in th|e clut, |
|000014e0| 61 6e 64 20 74 68 65 20 | 22 76 61 6c 75 65 22 20 |and the |"value" |
|000014f0| 66 69 65 6c 64 20 6f 66 | 20 65 61 63 68 20 65 6c |field of| each el|
|00001500| 65 6d 65 6e 74 20 6f 66 | 20 74 61 62 6c 65 20 69 |ement of| table i|
|00001510| 73 0d 69 67 6e 6f 72 65 | 64 2e 20 49 6e 20 69 6e |s.ignore|d. In in|
|00001520| 64 65 78 20 6d 6f 64 65 | 20 22 73 74 61 72 74 22 |dex mode| "start"|
|00001530| 20 6d 75 73 74 20 62 65 | 20 2d 31 2c 20 61 6e 64 | must be| -1, and|
|00001540| 20 74 68 65 20 22 76 61 | 6c 75 65 22 20 66 69 65 | the "va|lue" fie|
|00001550| 6c 64 20 6f 66 20 65 61 | 63 68 20 65 6c 65 6d 65 |ld of ea|ch eleme|
|00001560| 6e 74 0d 6f 66 20 74 61 | 62 6c 65 20 69 6e 64 69 |nt.of ta|ble indi|
|00001570| 63 61 74 65 73 20 77 68 | 69 63 68 20 63 6c 75 74 |cates wh|ich clut|
|00001580| 20 65 6e 74 72 79 20 74 | 6f 20 6c 6f 61 64 20 69 | entry t|o load i|
|00001590| 74 20 69 6e 74 6f 2e 20 | 54 68 65 20 61 72 67 75 |t into. |The argu|
|000015a0| 6d 65 6e 74 73 20 73 74 | 61 72 74 2c 20 63 6f 75 |ments st|art, cou|
|000015b0| 6e 74 2c 0d 61 6e 64 20 | 74 61 62 6c 65 20 61 72 |nt,.and |table ar|
|000015c0| 65 20 74 68 65 20 73 61 | 6d 65 20 61 73 20 66 6f |e the sa|me as fo|
|000015d0| 72 20 74 68 65 20 43 6f | 6c 6f 72 20 4d 61 6e 61 |r the Co|lor Mana|
|000015e0| 67 65 72 20 63 61 6c 6c | 20 53 65 74 45 6e 74 72 |ger call| SetEntr|
|000015f0| 69 65 73 28 29 2c 20 64 | 6f 63 75 6d 65 6e 74 65 |ies(), d|ocumente|
|00001600| 64 20 69 6e 0d 49 6e 73 | 69 64 65 20 4d 61 63 69 |d in.Ins|ide Maci|
|00001610| 6e 74 6f 73 68 20 56 2d | 31 34 33 2e 20 28 4d 6f |ntosh V-|143. (Mo|
|00001620| 73 74 20 64 72 69 76 65 | 72 73 20 77 61 69 74 20 |st drive|rs wait |
|00001630| 66 6f 72 20 62 6c 61 6e | 6b 69 6e 67 20 62 65 66 |for blan|king bef|
|00001640| 6f 72 65 20 6d 6f 64 69 | 66 79 69 6e 67 20 74 68 |ore modi|fying th|
|00001650| 65 0d 63 6c 75 74 2e 20 | 46 6f 72 20 61 20 66 75 |e.clut. |For a fu|
|00001660| 6c 6c 20 64 69 73 63 75 | 73 73 69 6f 6e 2c 20 72 |ll discu|ssion, r|
|00001670| 65 61 64 20 74 68 65 20 | 56 69 64 65 6f 54 6f 6f |ead the |VideoToo|
|00001680| 6c 62 6f 78 20 22 56 69 | 64 65 6f 20 73 79 6e 63 |lbox "Vi|deo sync|
|00001690| 68 22 20 66 69 6c 65 2e | 29 20 59 6f 75 20 6d 61 |h" file.|) You ma|
|000016a0| 79 0d 61 6c 73 6f 20 77 | 61 6e 74 20 74 6f 20 6c |y.also w|ant to l|
|000016b0| 6f 6f 6b 20 61 74 20 74 | 68 65 20 66 69 6c 65 20 |ook at t|he file |
|000016c0| 53 65 74 45 6e 74 72 69 | 65 73 51 75 69 63 6b 6c |SetEntri|esQuickl|
|000016d0| 79 2e 63 2c 20 77 68 69 | 63 68 20 70 72 6f 76 69 |y.c, whi|ch provi|
|000016e0| 64 65 73 20 74 68 65 0d | 66 75 6e 63 74 69 6f 6e |des the.|function|
|000016f0| 61 6c 69 74 79 20 6f 66 | 20 47 44 53 65 74 45 6e |ality of| GDSetEn|
|00001700| 74 72 69 65 73 20 61 6e | 64 20 47 44 44 69 72 65 |tries an|d GDDire|
|00001710| 63 74 53 65 74 45 6e 74 | 72 69 65 73 2c 20 62 75 |ctSetEnt|ries, bu|
|00001720| 74 20 62 79 70 61 73 73 | 65 73 20 74 68 65 20 76 |t bypass|es the v|
|00001730| 69 64 65 6f 0d 64 72 69 | 76 65 72 20 74 6f 20 61 |ideo.dri|ver to a|
|00001740| 63 63 65 73 73 20 74 68 | 65 20 68 61 72 64 77 61 |ccess th|e hardwa|
|00001750| 72 65 20 64 69 72 65 63 | 74 6c 79 2e 0d 0d 4f 53 |re direc|tly...OS|
|00001760| 45 72 72 20 47 44 53 65 | 74 45 6e 74 72 69 65 73 |Err GDSe|tEntries|
|00001770| 42 79 54 79 70 65 28 47 | 44 48 61 6e 64 6c 65 20 |ByType(G|DHandle |
|00001780| 64 65 76 69 63 65 2c 73 | 68 6f 72 74 20 73 74 61 |device,s|hort sta|
|00001790| 72 74 2c 73 68 6f 72 74 | 20 63 6f 75 6e 74 2c 43 |rt,short| count,C|
|000017a0| 6f 6c 6f 72 53 70 65 63 | 20 2a 74 61 62 6c 65 29 |olorSpec| *table)|
|000017b0| 3b 0d 43 68 65 63 6b 73 | 20 74 68 65 20 28 2a 2a |;.Checks| the (**|
|000017c0| 64 65 76 69 63 65 29 2e | 67 64 54 79 70 65 20 66 |device).|gdType f|
|000017d0| 69 65 6c 64 20 61 6e 64 | 20 63 61 6c 6c 73 20 63 |ield and| calls c|
|000017e0| 73 63 53 65 74 45 6e 74 | 72 69 65 73 2c 20 63 73 |scSetEnt|ries, cs|
|000017f0| 63 44 69 72 65 63 74 53 | 65 74 45 6e 74 72 69 65 |cDirectS|etEntrie|
|00001800| 73 2c 0d 6f 72 20 6e 6f | 74 68 69 6e 67 2c 20 61 |s,.or no|thing, a|
|00001810| 73 20 61 70 70 72 6f 70 | 72 69 61 74 65 2e 0d 0d |s approp|riate...|
|00001820| 4f 53 45 72 72 20 47 44 | 53 65 74 45 6e 74 72 69 |OSErr GD|SetEntri|
|00001830| 65 73 42 79 54 79 70 65 | 48 69 67 68 50 72 69 6f |esByType|HighPrio|
|00001840| 72 69 74 79 28 47 44 48 | 61 6e 64 6c 65 20 64 65 |rity(GDH|andle de|
|00001850| 76 69 63 65 2c 73 68 6f | 72 74 20 73 74 61 72 74 |vice,sho|rt start|
|00001860| 2c 73 68 6f 72 74 20 63 | 6f 75 6e 74 0d 09 2c 43 |,short c|ount..,C|
|00001870| 6f 6c 6f 72 53 70 65 63 | 20 2a 74 61 62 6c 65 29 |olorSpec| *table)|
|00001880| 3b 0d 43 61 6c 6c 73 20 | 47 44 53 65 74 45 6e 74 |;.Calls |GDSetEnt|
|00001890| 72 69 65 73 42 79 54 79 | 70 65 28 29 20 77 68 69 |riesByTy|pe() whi|
|000018a0| 6c 65 20 74 68 65 20 70 | 72 6f 63 65 73 73 6f 72 |le the p|rocessor|
|000018b0| 20 70 72 69 6f 72 69 74 | 79 20 68 61 73 20 62 65 | priorit|y has be|
|000018c0| 65 6e 20 74 65 6d 70 6f | 72 61 72 69 6c 79 20 0d |en tempo|rarily .|
|000018d0| 72 61 69 73 65 64 20 74 | 6f 20 37 2e 0d 0d 4f 53 |raised t|o 7...OS|
|000018e0| 45 72 72 20 47 44 53 65 | 74 47 61 6d 6d 61 28 47 |Err GDSe|tGamma(G|
|000018f0| 44 48 61 6e 64 6c 65 20 | 64 65 76 69 63 65 2c 20 |DHandle |device, |
|00001900| 47 61 6d 6d 61 54 62 6c | 20 2a 67 61 6d 6d 61 29 |GammaTbl| *gamma)|
|00001910| 3b 0d 43 61 6c 6c 73 20 | 63 73 63 53 65 74 47 61 |;.Calls |cscSetGa|
|00001920| 6d 6d 61 2e 20 4c 6f 61 | 64 73 20 61 20 47 61 6d |mma. Loa|ds a Gam|
|00001930| 6d 61 20 74 61 62 6c 65 | 20 69 6e 74 6f 20 74 68 |ma table| into th|
|00001940| 65 20 73 70 65 63 69 66 | 69 65 64 20 76 69 64 65 |e specif|ied vide|
|00001950| 6f 20 64 65 76 69 63 65 | 2e 20 54 68 65 0d 76 69 |o device|. The.vi|
|00001960| 64 65 6f 20 64 72 69 76 | 65 72 20 77 69 6c 6c 20 |deo driv|er will |
|00001970| 6d 61 6b 65 20 61 20 63 | 6f 70 79 20 6f 66 20 79 |make a c|opy of y|
|00001980| 6f 75 72 20 74 61 62 6c | 65 2e 20 59 6f 75 20 63 |our tabl|e. You c|
|00001990| 61 6e 20 64 69 73 63 61 | 72 64 20 79 6f 75 72 20 |an disca|rd your |
|000019a0| 74 61 62 6c 65 20 61 66 | 74 65 72 0d 6d 61 6b 69 |table af|ter.maki|
|000019b0| 6e 67 20 74 68 69 73 20 | 63 61 6c 6c 2e 20 4e 6f |ng this |call. No|
|000019c0| 74 65 20 74 68 61 74 20 | 74 68 65 20 76 69 64 65 |te that |the vide|
|000019d0| 6f 20 64 72 69 76 65 72 | 20 6f 6e 6c 79 20 75 73 |o driver| only us|
|000019e0| 65 73 20 74 68 65 20 67 | 61 6d 6d 61 20 74 61 62 |es the g|amma tab|
|000019f0| 6c 65 20 77 68 65 6e 0d | 70 65 72 66 6f 72 6d 69 |le when.|performi|
|00001a00| 6e 67 20 53 65 74 45 6e | 74 72 69 65 73 2c 20 69 |ng SetEn|tries, i|
|00001a10| 2e 65 2e 20 77 68 65 6e | 20 61 63 74 75 61 6c 6c |.e. when| actuall|
|00001a20| 79 20 6c 6f 61 64 69 6e | 67 20 74 68 65 20 63 6c |y loadin|g the cl|
|00001a30| 75 74 2e 20 54 68 65 20 | 73 74 72 75 63 74 75 72 |ut. The |structur|
|00001a40| 65 20 6f 66 20 74 68 65 | 0d 67 61 6d 6d 61 20 74 |e of the|.gamma t|
|00001a50| 61 62 6c 65 20 69 73 20 | 28 66 69 6e 61 6c 6c 79 |able is |(finally|
|00001a60| 21 29 20 64 6f 63 75 6d | 65 6e 74 65 64 20 69 6e |!) docum|ented in|
|00001a70| 20 44 65 73 69 67 6e 69 | 6e 67 20 43 61 72 64 73 | Designi|ng Cards|
|00001a80| 20 61 6e 64 20 44 72 69 | 76 65 72 73 2c 20 33 72 | and Dri|vers, 3r|
|00001a90| 64 0d 65 64 69 74 69 6f | 6e 2c 20 70 61 67 65 73 |d.editio|n, pages|
|00001aa0| 20 32 31 35 2d 32 31 36 | 2e 20 42 65 77 61 72 65 | 215-216|. Beware|
|00001ab0| 20 6f 66 20 61 20 64 69 | 73 63 72 65 70 61 6e 63 | of a di|screpanc|
|00001ac0| 79 20 62 65 74 77 65 65 | 6e 20 74 68 65 20 64 6f |y betwee|n the do|
|00001ad0| 63 75 6d 65 6e 74 61 74 | 69 6f 6e 20 61 6e 64 0d |cumentat|ion and.|
|00001ae0| 74 68 65 20 64 65 66 69 | 6e 69 74 69 6f 6e 20 69 |the defi|nition i|
|00001af0| 6e 20 51 75 69 63 6b 44 | 72 61 77 2e 68 3a 20 67 |n QuickD|raw.h: g|
|00001b00| 46 6f 72 6d 75 6c 61 44 | 61 74 61 20 69 73 20 64 |FormulaD|ata is d|
|00001b10| 65 73 63 72 69 62 65 64 | 20 61 73 20 61 20 62 79 |escribed| as a by|
|00001b20| 74 65 20 61 72 72 61 79 | 20 69 6e 20 74 68 65 0d |te array| in the.|
|00001b30| 74 65 78 74 2c 20 62 75 | 74 20 69 73 20 64 65 63 |text, bu|t is dec|
|00001b40| 6c 61 72 65 64 20 61 73 | 20 61 20 73 68 6f 72 74 |lared as| a short|
|00001b50| 20 61 72 72 61 79 20 69 | 6e 20 74 68 65 20 51 75 | array i|n the Qu|
|00001b60| 69 63 6b 44 72 61 77 2e | 68 20 68 65 61 64 65 72 |ickDraw.|h header|
|00001b70| 20 66 69 6c 65 2e 20 4e | 4f 54 45 3a 20 61 0d 66 | file. N|OTE: a.f|
|00001b80| 65 77 20 76 69 64 65 6f | 20 64 72 69 76 65 72 73 |ew video| drivers|
|00001b90| 20 28 52 61 64 69 75 73 | 20 50 6f 77 65 72 56 69 | (Radius| PowerVi|
|00001ba0| 65 77 20 61 6e 64 20 53 | 75 70 65 72 4d 61 63 20 |ew and S|uperMac |
|00001bb0| 43 6f 6c 6f 72 43 61 72 | 64 29 20 64 6f 20 6e 6f |ColorCar|d) do no|
|00001bc0| 74 20 73 75 70 70 6f 72 | 74 20 67 61 6d 6d 61 0d |t suppor|t gamma.|
|00001bd0| 74 61 62 6c 65 73 2e 20 | 54 68 65 20 53 75 70 65 |tables. |The Supe|
|00001be0| 72 4d 61 63 20 43 6f 6c | 6f 72 43 61 72 64 20 69 |rMac Col|orCard i|
|00001bf0| 73 20 77 65 6c 6c 20 62 | 65 68 61 76 65 64 2c 20 |s well b|ehaved, |
|00001c00| 67 69 76 69 6e 67 20 74 | 68 65 20 61 70 70 72 6f |giving t|he appro|
|00001c10| 70 72 69 61 74 65 20 65 | 72 72 6f 72 0d 63 6f 64 |priate e|rror.cod|
|00001c20| 65 2c 20 72 65 74 75 72 | 6e 65 64 20 62 79 20 47 |e, retur|ned by G|
|00001c30| 44 53 65 74 47 61 6d 6d | 61 20 61 6e 64 20 47 44 |DSetGamm|a and GD|
|00001c40| 47 65 74 47 61 6d 6d 61 | 2e 20 54 68 65 20 52 61 |GetGamma|. The Ra|
|00001c50| 64 69 75 73 20 50 6f 77 | 65 72 56 69 65 77 20 72 |dius Pow|erView r|
|00001c60| 65 70 6f 72 74 73 20 6e | 6f 0d 65 72 72 6f 72 20 |eports n|o.error |
|00001c70| 79 65 74 20 69 67 6e 6f | 72 65 73 20 74 68 65 20 |yet igno|res the |
|00001c80| 47 44 53 65 74 47 61 6d | 6d 61 20 63 61 6c 6c 20 |GDSetGam|ma call |
|00001c90| 61 6e 64 20 72 65 74 75 | 72 6e 73 20 61 20 74 61 |and retu|rns a ta|
|00001ca0| 62 6c 65 20 66 75 6c 6c | 20 6f 66 20 7a 65 72 6f |ble full| of zero|
|00001cb0| 65 73 20 69 6e 0d 72 65 | 73 70 6f 6e 73 65 20 74 |es in.re|sponse t|
|00001cc0| 6f 20 47 44 47 65 74 47 | 61 6d 6d 61 2e 20 53 65 |o GDGetG|amma. Se|
|00001cd0| 65 20 4e 4f 54 45 20 66 | 72 6f 6d 20 54 6f 6d 20 |e NOTE f|rom Tom |
|00001ce0| 42 75 73 65 79 20 62 65 | 6c 6f 77 2e 20 48 6f 77 |Busey be|low. How|
|00001cf0| 65 76 65 72 2c 20 69 66 | 20 61 6c 6c 20 79 6f 75 |ever, if| all you|
|00001d00| 20 77 61 6e 74 0d 74 6f | 20 64 6f 20 69 73 20 63 | want.to| do is c|
|00001d10| 61 6c 6c 20 47 44 55 6e | 63 6f 72 72 65 63 74 65 |all GDUn|correcte|
|00001d20| 64 47 61 6d 6d 61 2c 20 | 74 68 65 6e 20 74 68 65 |dGamma, |then the|
|00001d30| 73 65 20 6c 69 6d 69 74 | 61 74 69 6f 6e 73 20 77 |se limit|ations w|
|00001d40| 6f 6e 27 74 20 61 66 66 | 65 63 74 20 79 6f 75 2c |on't aff|ect you,|
|00001d50| 0d 62 65 63 61 75 73 65 | 20 74 68 65 20 64 72 69 |.because| the dri|
|00001d60| 76 65 72 73 20 74 68 61 | 74 20 6c 61 63 6b 20 67 |vers tha|t lack g|
|00001d70| 61 6d 6d 61 20 74 61 62 | 6c 65 73 20 61 6c 77 61 |amma tab|les alwa|
|00001d80| 79 73 20 67 69 76 65 20 | 79 6f 75 20 70 72 65 63 |ys give |you prec|
|00001d90| 69 73 65 6c 79 20 74 68 | 65 0d 62 65 68 61 76 69 |isely th|e.behavi|
|00001da0| 6f 75 72 20 74 68 61 74 | 20 6f 6e 65 20 72 65 71 |our that| one req|
|00001db0| 75 65 73 74 73 20 62 79 | 20 63 61 6c 6c 69 6e 67 |uests by| calling|
|00001dc0| 20 47 44 55 6e 63 6f 72 | 72 65 63 74 65 64 47 61 | GDUncor|rectedGa|
|00001dd0| 6d 6d 61 2e 0d 0d 4f 53 | 45 72 72 20 47 44 53 65 |mma...OS|Err GDSe|
|00001de0| 74 50 61 67 65 44 72 61 | 77 6e 28 47 44 48 61 6e |tPageDra|wn(GDHan|
|00001df0| 64 6c 65 20 64 65 76 69 | 63 65 2c 73 68 6f 72 74 |dle devi|ce,short|
|00001e00| 20 70 61 67 65 29 3b 0d | 43 68 6f 6f 73 65 20 77 | page);.|Choose w|
|00001e10| 68 69 63 68 20 70 61 67 | 65 20 6f 66 20 76 69 64 |hich pag|e of vid|
|00001e20| 65 6f 20 6d 65 6d 6f 72 | 79 20 77 69 6c 6c 20 62 |eo memor|y will b|
|00001e30| 65 20 75 73 65 64 20 62 | 79 20 66 75 74 75 72 65 |e used b|y future|
|00001e40| 20 64 72 61 77 69 6e 67 | 20 6f 70 65 72 61 74 69 | drawing| operati|
|00001e50| 6f 6e 73 2e 20 0d 55 6e | 74 65 73 74 65 64 2e 0d |ons. .Un|tested..|
|00001e60| 0d 4f 53 45 72 72 20 47 | 44 53 65 74 50 61 67 65 |.OSErr G|DSetPage|
|00001e70| 53 68 6f 77 6e 28 47 44 | 48 61 6e 64 6c 65 20 64 |Shown(GD|Handle d|
|00001e80| 65 76 69 63 65 2c 73 68 | 6f 72 74 20 70 61 67 65 |evice,sh|ort page|
|00001e90| 29 3b 0d 43 68 6f 6f 73 | 65 20 77 68 69 63 68 20 |);.Choos|e which |
|00001ea0| 70 61 67 65 20 6f 66 20 | 76 69 64 65 6f 20 6d 65 |page of |video me|
|00001eb0| 6d 6f 72 79 20 77 65 20 | 73 65 65 2e 20 55 6e 74 |mory we |see. Unt|
|00001ec0| 65 73 74 65 64 2e 0d 0d | 4f 53 45 72 72 20 47 44 |ested...|OSErr GD|
|00001ed0| 55 6e 63 6f 72 72 65 63 | 74 65 64 47 61 6d 6d 61 |Uncorrec|tedGamma|
|00001ee0| 28 47 44 48 61 6e 64 6c | 65 20 64 65 76 69 63 65 |(GDHandl|e device|
|00001ef0| 29 3b 0d 41 73 6b 73 20 | 47 44 53 65 74 47 61 6d |);.Asks |GDSetGam|
|00001f00| 6d 61 20 74 6f 20 6c 6f | 61 64 20 61 20 6c 69 6e |ma to lo|ad a lin|
|00001f10| 65 61 72 20 67 61 6d 6d | 61 20 74 61 62 6c 65 2c |ear gamm|a table,|
|00001f20| 20 69 2e 65 2e 20 6e 6f | 20 63 6f 72 72 65 63 74 | i.e. no| correct|
|00001f30| 69 6f 6e 2e 20 28 54 68 | 65 20 67 61 6d 6d 61 0d |ion. (Th|e gamma.|
|00001f40| 63 6f 72 72 65 63 74 69 | 6f 6e 20 69 6d 70 6c 65 |correcti|on imple|
|00001f50| 6d 65 6e 74 65 64 20 62 | 79 20 74 61 62 6c 65 2d |mented b|y table-|
|00001f60| 6c 6f 6f 6b 75 70 20 69 | 6e 20 74 68 65 20 76 69 |lookup i|n the vi|
|00001f70| 64 65 6f 20 64 72 69 76 | 65 72 20 69 73 20 74 6f |deo driv|er is to|
|00001f80| 6f 20 63 72 75 64 65 20 | 66 6f 72 0d 65 78 70 65 |o crude |for.expe|
|00001f90| 72 69 6d 65 6e 74 73 20 | 74 68 61 74 20 77 61 6e |riments |that wan|
|00001fa0| 74 20 61 63 63 75 72 61 | 74 65 20 6c 75 6d 69 6e |t accura|te lumin|
|00001fb0| 61 6e 63 65 20 63 6f 6e | 74 72 6f 6c 2e 29 0d 0d |ance con|trol.)..|
|00001fc0| 69 6e 74 20 47 44 56 65 | 72 73 69 6f 6e 28 47 44 |int GDVe|rsion(GD|
|00001fd0| 48 61 6e 64 6c 65 20 64 | 65 76 69 63 65 29 0d 52 |Handle d|evice).R|
|00001fe0| 65 74 75 72 6e 73 20 74 | 68 65 20 76 65 72 73 69 |eturns t|he versi|
|00001ff0| 6f 6e 20 6e 75 6d 62 65 | 72 20 6f 66 20 74 68 65 |on numbe|r of the|
|00002000| 20 64 72 69 76 65 72 2e | 20 46 72 6f 6d 20 74 68 | driver.| From th|
|00002010| 65 20 66 69 72 73 74 20 | 77 6f 72 64 2d 61 6c 69 |e first |word-ali|
|00002020| 67 6e 65 64 20 77 6f 72 | 64 20 61 66 74 65 72 0d |gned wor|d after.|
|00002030| 74 68 65 20 6e 61 6d 65 | 20 73 74 72 69 6e 67 2e |the name| string.|
|00002040| 20 54 68 69 73 20 69 73 | 20 71 75 69 63 6b 2e 0d | This is| quick..|
|00002050| 0d 4f 53 45 72 72 20 47 | 44 47 65 74 4e 65 78 74 |.OSErr G|DGetNext|
|00002060| 52 65 73 6f 6c 75 74 69 | 6f 6e 28 29 0d 49 6d 70 |Resoluti|on().Imp|
|00002070| 6c 65 6d 65 6e 74 73 20 | 63 73 63 47 65 74 4e 65 |lements |cscGetNe|
|00002080| 78 74 52 65 73 6f 6c 75 | 74 69 6f 6e 2e 0d 0d 4c |xtResolu|tion...L|
|00002090| 45 53 53 2d 55 53 45 46 | 55 4c 20 28 4c 4f 57 20 |ESS-USEF|UL (LOW |
|000020a0| 4c 45 56 45 4c 29 20 52 | 4f 55 54 49 4e 45 53 3a |LEVEL) R|OUTINES:|
|000020b0| 0d 0d 4f 53 45 72 72 20 | 47 44 43 6f 6e 74 72 6f |..OSErr |GDContro|
|000020c0| 6c 28 69 6e 74 20 72 65 | 66 4e 75 6d 2c 69 6e 74 |l(int re|fNum,int|
|000020d0| 20 63 73 43 6f 64 65 2c | 50 74 72 20 63 73 50 61 | csCode,|Ptr csPa|
|000020e0| 72 61 6d 50 74 72 29 0d | 55 73 65 73 20 6c 6f 77 |ramPtr).|Uses low|
|000020f0| 2d 6c 65 76 65 6c 20 50 | 42 43 6f 6e 74 72 6f 6c |-level P|BControl|
|00002100| 28 29 20 63 61 6c 6c 20 | 74 6f 20 69 6d 70 6c 65 |() call |to imple|
|00002110| 6d 65 6e 74 20 61 20 22 | 43 6f 6e 74 72 6f 6c 28 |ment a "|Control(|
|00002120| 29 22 20 63 61 6c 6c 20 | 74 68 61 74 20 77 6f 72 |)" call |that wor|
|00002130| 6b 73 21 20 0d 49 20 64 | 6f 6e 27 74 20 6b 6e 6f |ks! .I d|on't kno|
|00002140| 77 20 77 68 79 20 74 68 | 69 73 20 77 61 73 6e 27 |w why th|is wasn'|
|00002150| 74 20 64 69 73 63 75 73 | 73 65 64 20 69 6e 20 41 |t discus|sed in A|
|00002160| 70 70 6c 65 20 54 65 63 | 68 20 4e 6f 74 65 20 32 |pple Tec|h Note 2|
|00002170| 36 32 2e 0d 0d 4f 53 45 | 72 72 20 47 44 44 69 72 |62...OSE|rr GDDir|
|00002180| 65 63 74 53 65 74 45 6e | 74 72 69 65 73 28 47 44 |ectSetEn|tries(GD|
|00002190| 48 61 6e 64 6c 65 20 64 | 65 76 69 63 65 2c 73 68 |Handle d|evice,sh|
|000021a0| 6f 72 74 20 73 74 61 72 | 74 2c 73 68 6f 72 74 20 |ort star|t,short |
|000021b0| 63 6f 75 6e 74 2c 43 6f | 6c 6f 72 53 70 65 63 20 |count,Co|lorSpec |
|000021c0| 2a 74 61 62 6c 65 29 3b | 0d 43 61 6c 6c 73 20 63 |*table);|.Calls c|
|000021d0| 73 63 44 69 72 65 63 74 | 53 65 74 45 6e 74 72 69 |scDirect|SetEntri|
|000021e0| 65 73 2e 20 49 66 20 79 | 6f 75 72 20 70 69 78 65 |es. If y|our pixe|
|000021f0| 6c 20 64 65 70 74 68 20 | 69 73 20 3e 38 20 74 68 |l depth |is >8 th|
|00002200| 65 6e 20 74 68 65 20 63 | 73 63 53 65 74 45 6e 74 |en the c|scSetEnt|
|00002210| 72 69 65 73 20 63 61 6c | 6c 20 69 73 0d 64 69 73 |ries cal|l is.dis|
|00002220| 61 62 6c 65 64 2c 20 61 | 6e 64 20 79 6f 75 20 6d |abled, a|nd you m|
|00002230| 75 73 74 20 75 73 65 20 | 74 68 69 73 20 69 6e 73 |ust use |this ins|
|00002240| 74 65 61 64 20 6f 66 20 | 47 44 53 65 74 45 6e 74 |tead of |GDSetEnt|
|00002250| 72 69 65 73 28 29 2e 0d | 0d 56 69 64 65 6f 44 72 |ries()..|.VideoDr|
|00002260| 69 76 65 72 20 2a 47 44 | 44 72 69 76 65 72 41 64 |iver *GD|DriverAd|
|00002270| 64 72 65 73 73 28 47 44 | 48 61 6e 64 6c 65 20 64 |dress(GD|Handle d|
|00002280| 65 76 69 63 65 29 3b 0d | 52 65 74 75 72 6e 73 20 |evice);.|Returns |
|00002290| 61 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 74 68 65 |a pointe|r to the|
|000022a0| 20 64 72 69 76 65 72 2c | 20 77 68 65 74 68 65 72 | driver,| whether|
|000022b0| 20 69 6e 20 52 4f 4d 20 | 6f 72 20 52 41 4d 2e 20 | in ROM |or RAM. |
|000022c0| 4e 65 69 74 68 65 72 20 | 74 68 69 73 20 70 72 6f |Neither |this pro|
|000022d0| 74 6f 74 79 70 65 0d 6e | 6f 72 20 74 68 65 20 64 |totype.n|or the d|
|000022e0| 65 66 69 6e 69 74 69 6f | 6e 20 6f 66 20 74 68 65 |efinitio|n of the|
|000022f0| 20 56 69 64 65 6f 44 72 | 69 76 65 72 20 73 74 72 | VideoDr|iver str|
|00002300| 75 63 74 75 72 65 20 61 | 72 65 20 69 6e 63 6c 75 |ucture a|re inclu|
|00002310| 64 65 64 20 69 6e 20 56 | 69 64 65 6f 54 6f 6f 6c |ded in V|ideoTool|
|00002320| 62 6f 78 2e 68 2e 0d 0d | 4f 53 45 72 72 20 47 44 |box.h...|OSErr GD|
|00002330| 47 65 74 44 65 66 61 75 | 6c 74 4d 6f 64 65 28 47 |GetDefau|ltMode(G|
|00002340| 44 48 61 6e 64 6c 65 20 | 64 65 76 69 63 65 2c 73 |DHandle |device,s|
|00002350| 68 6f 72 74 20 2a 6d 6f | 64 65 50 74 72 29 0d 43 |hort *mo|dePtr).C|
|00002360| 61 6c 6c 73 20 63 73 63 | 47 65 74 44 65 66 61 75 |alls csc|GetDefau|
|00002370| 6c 74 4d 6f 64 65 2e 20 | 49 74 20 74 65 6c 6c 73 |ltMode. |It tells|
|00002380| 20 79 6f 75 20 77 68 61 | 74 20 74 68 65 20 64 65 | you wha|t the de|
|00002390| 66 61 75 6c 74 20 6d 6f | 64 65 20 69 73 2e 20 49 |fault mo|de is. I|
|000023a0| 27 6d 20 6e 6f 74 20 73 | 75 72 65 0d 77 68 61 74 |'m not s|ure.what|
|000023b0| 20 74 68 69 73 20 6d 65 | 61 6e 73 2e 0d 0d 4f 53 | this me|ans...OS|
|000023c0| 45 72 72 20 47 44 47 65 | 74 47 72 61 79 28 47 44 |Err GDGe|tGray(GD|
|000023d0| 48 61 6e 64 6c 65 20 64 | 65 76 69 63 65 2c 42 6f |Handle d|evice,Bo|
|000023e0| 6f 6c 65 61 6e 20 2a 66 | 6c 61 67 50 74 72 29 3b |olean *f|lagPtr);|
|000023f0| 0d 43 61 6c 6c 73 20 63 | 73 63 47 65 74 47 72 61 |.Calls c|scGetGra|
|00002400| 79 2e 20 47 65 74 20 67 | 72 61 79 20 66 6c 61 67 |y. Get g|ray flag|
|00002410| 2e 20 30 20 66 6f 72 20 | 63 6f 6c 6f 72 2e 20 31 |. 0 for |color. 1|
|00002420| 20 69 66 20 61 6c 6c 20 | 63 6f 6c 6f 72 73 20 6d | if all |colors m|
|00002430| 61 70 70 65 64 20 74 6f | 0d 6c 75 6d 69 6e 61 6e |apped to|.luminan|
|00002440| 63 65 2d 65 71 75 69 76 | 61 6c 65 6e 74 20 67 72 |ce-equiv|alent gr|
|00002450| 61 79 20 74 6f 6e 65 73 | 2e 0d 0d 4f 53 45 72 72 |ay tones|...OSErr|
|00002460| 20 47 44 47 65 74 49 6e | 74 65 72 72 75 70 74 28 | GDGetIn|terrupt(|
|00002470| 47 44 48 61 6e 64 6c 65 | 20 64 65 76 69 63 65 2c |GDHandle| device,|
|00002480| 42 6f 6f 6c 65 61 6e 20 | 2a 66 6c 61 67 50 74 72 |Boolean |*flagPtr|
|00002490| 29 3b 0d 43 61 6c 6c 73 | 20 63 73 63 47 65 74 49 |);.Calls| cscGetI|
|000024a0| 6e 74 65 72 72 75 70 74 | 2e 20 47 65 74 20 66 6c |nterrupt|. Get fl|
|000024b0| 61 67 2e 20 31 20 69 66 | 20 56 42 4c 20 69 6e 74 |ag. 1 if| VBL int|
|000024c0| 65 72 72 75 70 74 73 20 | 6f 66 20 74 68 69 73 20 |errupts |of this |
|000024d0| 63 61 72 64 20 61 72 65 | 20 65 6e 61 62 6c 65 64 |card are| enabled|
|000024e0| 2e 20 30 0d 69 66 20 64 | 69 73 61 62 6c 65 64 2e |. 0.if d|isabled.|
|000024f0| 0d 0d 4f 53 45 72 72 20 | 47 44 47 65 74 4d 6f 64 |..OSErr |GDGetMod|
|00002500| 65 28 47 44 48 61 6e 64 | 6c 65 20 64 65 76 69 63 |e(GDHand|le devic|
|00002510| 65 2c 73 68 6f 72 74 20 | 2a 6d 6f 64 65 50 74 72 |e,short |*modePtr|
|00002520| 2c 73 68 6f 72 74 20 2a | 70 61 67 65 50 74 72 2c |,short *|pagePtr,|
|00002530| 50 74 72 20 2a 62 61 73 | 65 41 64 64 72 50 74 72 |Ptr *bas|eAddrPtr|
|00002540| 29 3b 0d 43 61 6c 6c 73 | 20 63 73 63 47 65 74 4d |);.Calls| cscGetM|
|00002550| 6f 64 65 2e 20 49 74 20 | 74 65 6c 6c 73 20 79 6f |ode. It |tells yo|
|00002560| 75 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 6d 6f |u the cu|rrent mo|
|00002570| 64 65 2c 20 70 61 67 65 | 20 6f 66 20 76 69 64 65 |de, page| of vide|
|00002580| 6f 20 6d 65 6d 6f 72 79 | 2c 20 61 6e 64 20 74 68 |o memory|, and th|
|00002590| 65 0d 62 61 73 65 20 61 | 64 64 72 65 73 73 20 6f |e.base a|ddress o|
|000025a0| 66 20 74 68 61 74 20 70 | 61 67 65 2e 0d 0d 4f 53 |f that p|age...OS|
|000025b0| 45 72 72 20 47 44 47 65 | 74 50 61 67 65 42 61 73 |Err GDGe|tPageBas|
|000025c0| 65 28 47 44 48 61 6e 64 | 6c 65 20 64 65 76 69 63 |e(GDHand|le devic|
|000025d0| 65 2c 73 68 6f 72 74 20 | 70 61 67 65 2c 50 74 72 |e,short |page,Ptr|
|000025e0| 20 2a 62 61 73 65 41 64 | 64 72 50 74 72 29 3b 0d | *baseAd|drPtr);.|
|000025f0| 43 61 6c 6c 73 20 63 73 | 63 47 65 74 50 61 67 65 |Calls cs|cGetPage|
|00002600| 42 61 73 65 2e 20 28 43 | 61 6c 6c 65 64 20 22 63 |Base. (C|alled "c|
|00002610| 73 63 47 65 74 42 61 73 | 65 41 64 64 72 22 20 69 |scGetBas|eAddr" i|
|00002620| 6e 20 44 65 73 69 67 6e | 69 6e 67 20 43 61 72 64 |n Design|ing Card|
|00002630| 73 20 61 6e 64 20 44 72 | 69 76 65 72 73 2c 20 33 |s and Dr|ivers, 3|
|00002640| 72 64 0d 45 64 2e 29 20 | 59 6f 75 20 74 65 6c 6c |rd.Ed.) |You tell|
|00002650| 20 69 74 20 77 68 69 63 | 68 20 70 61 67 65 20 6f | it whic|h page o|
|00002660| 66 20 76 69 64 65 6f 20 | 6d 65 6d 6f 72 79 20 79 |f video |memory y|
|00002670| 6f 75 27 72 65 20 69 6e | 74 65 72 65 73 74 65 64 |ou're in|terested|
|00002680| 20 69 6e 20 28 69 6e 20 | 74 68 65 20 63 75 72 72 | in (in |the curr|
|00002690| 65 6e 74 0d 76 69 64 65 | 6f 20 6d 6f 64 65 29 2e |ent.vide|o mode).|
|000026a0| 20 49 74 20 74 65 6c 6c | 73 20 79 6f 75 20 74 68 | It tell|s you th|
|000026b0| 65 20 62 61 73 65 20 61 | 64 64 72 65 73 73 20 6f |e base a|ddress o|
|000026c0| 66 20 74 68 61 74 20 70 | 61 67 65 2e 0d 0d 4f 53 |f that p|age...OS|
|000026d0| 45 72 72 20 47 44 47 72 | 61 79 50 61 67 65 28 47 |Err GDGr|ayPage(G|
|000026e0| 44 48 61 6e 64 6c 65 20 | 64 65 76 69 63 65 2c 73 |DHandle |device,s|
|000026f0| 68 6f 72 74 20 70 61 67 | 65 29 3b 0d 43 61 6c 6c |hort pag|e);.Call|
|00002700| 73 20 63 73 63 47 72 61 | 79 50 61 67 65 2e 20 28 |s cscGra|yPage. (|
|00002710| 43 61 6c 6c 65 64 20 22 | 63 73 63 47 72 61 79 53 |Called "|cscGrayS|
|00002720| 63 72 65 65 6e 22 20 69 | 6e 20 44 65 73 69 67 6e |creen" i|n Design|
|00002730| 69 6e 67 20 43 61 72 64 | 73 20 61 6e 64 20 44 72 |ing Card|s and Dr|
|00002740| 69 76 65 72 73 2c 20 33 | 72 64 0d 45 64 2e 29 20 |ivers, 3|rd.Ed.) |
|00002750| 46 69 6c 6c 73 20 74 68 | 65 20 73 70 65 63 69 66 |Fills th|e specif|
|00002760| 69 65 64 20 70 61 67 65 | 20 77 69 74 68 20 67 72 |ied page| with gr|
|00002770| 61 79 2c 20 69 2e 65 2e | 20 74 68 65 20 64 69 74 |ay, i.e.| the dit|
|00002780| 68 65 72 65 64 20 64 65 | 73 6b 74 6f 70 20 70 61 |hered de|sktop pa|
|00002790| 74 74 65 72 6e 2e 20 49 | 27 6d 0d 6e 6f 74 20 61 |ttern. I|'m.not a|
|000027a0| 77 61 72 65 20 6f 66 20 | 61 6e 79 20 70 61 72 74 |ware of |any part|
|000027b0| 69 63 75 6c 61 72 20 61 | 64 76 61 6e 74 61 67 65 |icular a|dvantage|
|000027c0| 20 69 6e 20 75 73 69 6e | 67 20 74 68 69 73 20 69 | in usin|g this i|
|000027d0| 6e 73 74 65 61 64 20 6f | 66 20 46 69 6c 6c 52 65 |nstead o|f FillRe|
|000027e0| 63 74 28 29 2e 0d 44 65 | 73 69 67 6e 69 6e 67 20 |ct()..De|signing |
|000027f0| 43 61 72 64 73 20 61 6e | 64 20 44 72 69 76 65 72 |Cards an|d Driver|
|00002800| 73 2c 20 33 72 64 20 45 | 64 69 74 69 6f 6e 2c 20 |s, 3rd E|dition, |
|00002810| 43 68 61 70 74 65 72 20 | 39 2c 20 73 61 79 73 20 |Chapter |9, says |
|00002820| 74 68 61 74 20 66 6f 72 | 20 64 69 72 65 63 74 0d |that for| direct.|
|00002830| 64 65 76 69 63 65 73 2c | 20 69 2e 65 2e 20 3e 38 |devices,| i.e. >8|
|00002840| 20 62 69 74 20 70 69 78 | 65 6c 73 2c 20 74 68 65 | bit pix|els, the|
|00002850| 20 64 72 69 76 65 72 20 | 77 69 6c 6c 20 61 6c 73 | driver |will als|
|00002860| 6f 20 6c 6f 61 64 20 61 | 20 6c 69 6e 65 61 72 2c |o load a| linear,|
|00002870| 0d 67 61 6d 6d 61 2d 63 | 6f 72 72 65 63 74 65 64 |.gamma-c|orrected|
|00002880| 2c 20 67 72 61 79 20 63 | 6f 6c 6f 72 20 74 61 62 |, gray c|olor tab|
|00002890| 6c 65 2e 0d 0d 4f 53 45 | 72 72 20 47 44 52 65 73 |le...OSE|rr GDRes|
|000028a0| 65 74 28 47 44 48 61 6e | 64 6c 65 20 64 65 76 69 |et(GDHan|dle devi|
|000028b0| 63 65 2c 20 73 68 6f 72 | 74 20 2a 6d 6f 64 65 50 |ce, shor|t *modeP|
|000028c0| 74 72 2c 20 73 68 6f 72 | 74 20 2a 70 61 67 65 50 |tr, shor|t *pageP|
|000028d0| 74 72 2c 20 50 74 72 20 | 2a 62 61 73 65 41 64 64 |tr, Ptr |*baseAdd|
|000028e0| 72 50 74 72 29 3b 0d 43 | 61 6c 6c 73 20 63 73 63 |rPtr);.C|alls csc|
|000028f0| 52 65 73 65 74 2e 20 49 | 6e 69 74 69 61 6c 69 7a |Reset. I|nitializ|
|00002900| 65 20 74 68 65 20 76 69 | 64 65 6f 20 63 61 72 64 |e the vi|deo card|
|00002910| 20 74 6f 20 69 74 73 20 | 73 74 61 72 74 75 70 20 | to its |startup |
|00002920| 73 74 61 74 65 2c 20 75 | 73 75 61 6c 6c 79 20 31 |state, u|sually 1|
|00002930| 20 62 69 74 0d 70 65 72 | 20 70 69 78 65 6c 2e 20 | bit.per| pixel. |
|00002940| 52 65 74 75 72 6e 73 20 | 74 68 65 20 70 61 72 61 |Returns |the para|
|00002950| 6d 65 74 65 72 73 20 6f | 66 20 74 68 61 74 20 73 |meters o|f that s|
|00002960| 74 61 74 65 2e 0d 0d 4f | 53 45 72 72 20 47 44 53 |tate...O|SErr GDS|
|00002970| 65 74 44 65 66 61 75 6c | 74 4d 6f 64 65 28 47 44 |etDefaul|tMode(GD|
|00002980| 48 61 6e 64 6c 65 20 64 | 65 76 69 63 65 2c 73 68 |Handle d|evice,sh|
|00002990| 6f 72 74 20 6d 6f 64 65 | 29 3b 0d 43 61 6c 6c 73 |ort mode|);.Calls|
|000029a0| 20 63 73 63 53 65 74 44 | 65 66 61 75 6c 74 2e 20 | cscSetD|efault. |
|000029b0| 53 75 70 70 6f 73 65 64 | 6c 79 2c 20 79 6f 75 20 |Supposed|ly, you |
|000029c0| 74 65 6c 6c 20 69 74 20 | 77 68 61 74 20 6d 6f 64 |tell it |what mod|
|000029d0| 65 20 79 6f 75 20 77 61 | 6e 74 20 74 6f 20 73 74 |e you wa|nt to st|
|000029e0| 61 72 74 20 75 70 20 77 | 69 74 68 0d 77 68 65 6e |art up w|ith.when|
|000029f0| 20 79 6f 75 20 72 65 62 | 6f 6f 74 2e 20 28 49 27 | you reb|oot. (I'|
|00002a00| 76 65 20 6e 65 76 65 72 | 20 62 65 65 6e 20 61 62 |ve never| been ab|
|00002a10| 6c 65 20 74 6f 20 67 65 | 74 20 74 68 69 73 20 74 |le to ge|t this t|
|00002a20| 6f 20 77 6f 72 6b 2e 20 | 4e 6f 20 65 72 72 6f 72 |o work. |No error|
|00002a30| 20 61 6e 64 20 6e 6f 0d | 65 66 66 65 63 74 2e 20 | and no.|effect. |
|00002a40| 50 65 72 68 61 70 73 20 | 49 27 76 65 20 6d 69 73 |Perhaps |I've mis|
|00002a50| 75 6e 64 65 72 73 74 6f | 6f 64 20 69 74 73 20 70 |understo|od its p|
|00002a60| 75 72 70 6f 73 65 2e 29 | 0d 0d 4f 53 45 72 72 20 |urpose.)|..OSErr |
|00002a70| 47 44 53 65 74 47 72 61 | 79 28 47 44 48 61 6e 64 |GDSetGra|y(GDHand|
|00002a80| 6c 65 20 64 65 76 69 63 | 65 2c 42 6f 6f 6c 65 61 |le devic|e,Boolea|
|00002a90| 6e 20 66 6c 61 67 29 3b | 0d 43 61 6c 6c 73 20 63 |n flag);|.Calls c|
|00002aa0| 73 63 53 65 74 47 72 61 | 79 2e 20 53 65 74 20 67 |scSetGra|y. Set g|
|00002ab0| 72 61 79 20 66 6c 61 67 | 2e 20 30 20 66 6f 72 20 |ray flag|. 0 for |
|00002ac0| 63 6f 6c 6f 72 2e 20 31 | 20 69 66 20 61 6c 6c 20 |color. 1| if all |
|00002ad0| 63 6f 6c 6f 72 73 20 6d | 61 70 70 65 64 20 74 6f |colors m|apped to|
|00002ae0| 0d 6c 75 6d 69 6e 61 6e | 63 65 2d 65 71 75 69 76 |.luminan|ce-equiv|
|00002af0| 61 6c 65 6e 74 20 67 72 | 61 79 20 74 6f 6e 65 73 |alent gr|ay tones|
|00002b00| 2e 0d 0d 4f 53 45 72 72 | 20 47 44 53 65 74 49 6e |...OSErr| GDSetIn|
|00002b10| 74 65 72 72 75 70 74 28 | 47 44 48 61 6e 64 6c 65 |terrupt(|GDHandle|
|00002b20| 20 64 65 76 69 63 65 2c | 42 6f 6f 6c 65 61 6e 20 | device,|Boolean |
|00002b30| 66 6c 61 67 29 3b 0d 43 | 61 6c 6c 73 20 63 73 63 |flag);.C|alls csc|
|00002b40| 53 65 74 49 6e 74 65 72 | 72 75 70 74 2e 20 53 65 |SetInter|rupt. Se|
|00002b50| 74 20 66 6c 61 67 20 74 | 6f 20 31 20 74 6f 20 65 |t flag t|o 1 to e|
|00002b60| 6e 61 62 6c 65 20 56 42 | 4c 20 69 6e 74 65 72 72 |nable VB|L interr|
|00002b70| 75 70 74 73 20 6f 66 20 | 74 68 69 73 20 63 61 72 |upts of |this car|
|00002b80| 64 2c 20 6f 72 20 30 0d | 74 6f 20 64 69 73 61 62 |d, or 0.|to disab|
|00002b90| 6c 65 2e 0d 0d 4f 53 45 | 72 72 20 47 44 53 65 74 |le...OSE|rr GDSet|
|00002ba0| 4d 6f 64 65 28 47 44 48 | 61 6e 64 6c 65 20 64 65 |Mode(GDH|andle de|
|00002bb0| 76 69 63 65 2c 73 68 6f | 72 74 20 6d 6f 64 65 2c |vice,sho|rt mode,|
|00002bc0| 73 68 6f 72 74 20 70 61 | 67 65 2c 50 74 72 20 2a |short pa|ge,Ptr *|
|00002bd0| 62 61 73 65 41 64 64 72 | 50 74 72 29 3b 0d 43 61 |baseAddr|Ptr);.Ca|
|00002be0| 6c 6c 73 20 63 73 63 53 | 65 74 4d 6f 64 65 2e 20 |lls cscS|etMode. |
|00002bf0| 59 6f 75 20 74 65 6c 6c | 20 69 74 20 77 68 61 74 |You tell| it what|
|00002c00| 20 6d 6f 64 65 20 61 6e | 64 20 76 69 64 65 6f 20 | mode an|d video |
|00002c10| 70 61 67 65 20 79 6f 75 | 20 77 61 6e 74 2e 20 49 |page you| want. I|
|00002c20| 74 20 73 65 74 73 20 27 | 65 6d 20 61 6e 64 0d 72 |t sets '|em and.r|
|00002c30| 65 74 75 72 6e 73 20 74 | 68 65 20 62 61 73 65 20 |eturns t|he base |
|00002c40| 61 64 64 72 65 73 73 20 | 6f 66 20 74 68 61 74 20 |address |of that |
|00002c50| 70 61 67 65 20 69 6e 20 | 76 69 64 65 6f 20 6d 65 |page in |video me|
|00002c60| 6d 6f 72 79 2e 20 41 6c | 73 6f 2c 20 62 65 63 61 |mory. Al|so, beca|
|00002c70| 75 73 65 20 41 70 70 6c | 65 20 73 61 69 64 0d 73 |use Appl|e said.s|
|00002c80| 6f 2c 20 74 68 65 20 76 | 69 64 65 6f 20 64 72 69 |o, the v|ideo dri|
|00002c90| 76 65 72 20 73 65 74 73 | 20 74 68 65 20 65 6e 74 |ver sets| the ent|
|00002ca0| 69 72 65 20 63 6c 75 74 | 20 74 6f 20 35 30 25 20 |ire clut| to 50% |
|00002cb0| 67 72 61 79 2e 20 4e 6f | 74 65 20 74 68 61 74 20 |gray. No|te that |
|00002cc0| 74 68 69 73 20 63 68 61 | 6e 67 65 73 0d 74 68 69 |this cha|nges.thi|
|00002cd0| 6e 67 73 20 62 65 68 69 | 6e 64 20 51 75 69 63 6b |ngs behi|nd Quick|
|00002ce0| 44 72 61 77 27 73 20 62 | 61 63 6b 2e 20 46 6f 72 |Draw's b|ack. For|
|00002cf0| 20 6d 6f 73 74 20 61 70 | 70 6c 69 63 61 74 69 6f | most ap|plicatio|
|00002d00| 6e 73 20 6c 69 66 65 20 | 77 69 6c 6c 20 62 65 20 |ns life |will be |
|00002d10| 73 69 6d 70 6c 65 72 20 | 69 66 0d 79 6f 75 20 6f |simpler |if.you o|
|00002d20| 76 65 72 74 6c 79 20 61 | 73 6b 20 51 75 69 63 6b |vertly a|sk Quick|
|00002d30| 44 72 61 77 20 74 6f 20 | 74 61 6b 65 20 63 68 61 |Draw to |take cha|
|00002d40| 72 67 65 20 62 79 20 63 | 61 6c 6c 69 6e 67 20 41 |rge by c|alling A|
|00002d50| 70 70 6c 65 27 73 20 53 | 65 74 44 65 70 74 68 28 |pple's S|etDepth(|
|00002d60| 29 20 69 6e 73 74 65 61 | 64 0d 6f 66 20 47 44 53 |) instea|d.of GDS|
|00002d70| 65 74 4d 6f 64 65 28 29 | 2e 20 57 41 52 4e 49 4e |etMode()|. WARNIN|
|00002d80| 47 3a 20 41 70 70 6c 65 | 20 6e 6f 77 20 63 6f 6e |G: Apple| now con|
|00002d90| 73 69 64 65 72 73 20 74 | 68 65 20 6d 6f 64 65 20 |siders t|he mode |
|00002da0| 6e 75 6d 62 65 72 73 20 | 6d 65 72 65 6c 79 20 6f |numbers |merely o|
|00002db0| 72 64 69 6e 61 6c 2e 0d | 45 2e 67 2e 20 6f 6e 20 |rdinal..|E.g. on |
|00002dc0| 74 68 65 20 38 a5 32 34 | 20 76 69 64 65 6f 20 63 |the 8.24| video c|
|00002dd0| 61 72 64 20 74 68 65 20 | 33 32 2d 62 69 74 20 6d |ard the |32-bit m|
|00002de0| 6f 64 65 20 68 61 73 20 | 6d 6f 64 65 20 6e 75 6d |ode has |mode num|
|00002df0| 62 65 72 20 30 78 38 34 | 2c 20 6e 6f 74 20 30 78 |ber 0x84|, not 0x|
|00002e00| 38 35 20 61 73 0d 79 6f | 75 20 6d 69 67 68 74 20 |85 as.yo|u might |
|00002e10| 68 61 76 65 20 65 78 70 | 65 63 74 65 64 20 6f 6e |have exp|ected on|
|00002e20| 20 74 68 65 20 62 61 73 | 69 73 20 6f 66 20 6f 6c | the bas|is of ol|
|00002e30| 64 20 41 70 70 6c 65 20 | 64 6f 63 75 6d 65 6e 74 |d Apple |document|
|00002e40| 61 74 69 6f 6e 20 61 6e | 64 20 6f 74 68 65 72 20 |ation an|d other |
|00002e50| 41 70 70 6c 65 0d 76 69 | 64 65 6f 20 63 61 72 64 |Apple.vi|deo card|
|00002e60| 73 2e 0d 0d 4f 53 45 72 | 72 20 47 44 53 74 61 74 |s...OSEr|r GDStat|
|00002e70| 75 73 28 69 6e 74 20 72 | 65 66 4e 75 6d 2c 69 6e |us(int r|efNum,in|
|00002e80| 74 20 63 73 43 6f 64 65 | 2c 50 74 72 20 63 73 50 |t csCode|,Ptr csP|
|00002e90| 61 72 61 6d 50 74 72 29 | 0d 55 73 65 73 20 6c 6f |aramPtr)|.Uses lo|
|00002ea0| 77 2d 6c 65 76 65 6c 20 | 50 42 53 74 61 74 75 73 |w-level |PBStatus|
|00002eb0| 28 29 20 63 61 6c 6c 20 | 74 6f 20 69 6d 70 6c 65 |() call |to imple|
|00002ec0| 6d 65 6e 74 20 61 20 22 | 53 74 61 74 75 73 28 29 |ment a "|Status()|
|00002ed0| 22 20 63 61 6c 6c 20 74 | 68 61 74 20 77 6f 72 6b |" call t|hat work|
|00002ee0| 73 21 20 54 68 65 0d 6e | 65 65 64 20 66 6f 72 20 |s! The.n|eed for |
|00002ef0| 74 68 69 73 20 69 73 20 | 65 78 70 6c 61 69 6e 65 |this is |explaine|
|00002f00| 64 20 69 6e 20 41 70 70 | 6c 65 20 54 65 63 68 20 |d in App|le Tech |
|00002f10| 4e 6f 74 65 20 32 36 32 | 2c 20 77 68 69 63 68 20 |Note 262|, which |
|00002f20| 77 61 73 20 69 73 73 75 | 65 64 20 69 6e 20 72 65 |was issu|ed in re|
|00002f30| 73 70 6f 6e 73 65 0d 74 | 6f 20 6d 79 20 62 75 67 |sponse.t|o my bug|
|00002f40| 20 72 65 70 6f 72 74 20 | 69 6e 20 73 75 6d 6d 65 | report |in summe|
|00002f50| 72 20 6f 66 20 27 38 39 | 2e 0d 0d 50 61 74 63 68 |r of '89|...Patch|
|00002f60| 4d 61 63 49 49 63 69 56 | 69 64 65 6f 44 72 69 76 |MacIIciV|ideoDriv|
|00002f70| 65 72 28 29 3b 0d 46 69 | 78 65 73 20 61 20 63 72 |er();.Fi|xes a cr|
|00002f80| 61 73 68 69 6e 67 20 62 | 75 67 20 69 6e 20 74 68 |ashing b|ug in th|
|00002f90| 65 20 4d 61 63 20 49 49 | 63 69 20 62 75 69 6c 74 |e Mac II|ci built|
|00002fa0| 2d 69 6e 20 76 69 64 65 | 6f 20 64 72 69 76 65 72 |-in vide|o driver|
|00002fb0| 27 73 20 69 6d 70 6c 65 | 6d 65 6e 74 61 74 69 6f |'s imple|mentatio|
|00002fc0| 6e 20 6f 66 0d 63 73 63 | 47 65 74 45 6e 74 72 69 |n of.csc|GetEntri|
|00002fd0| 65 73 2e 20 54 68 65 20 | 70 61 74 63 68 20 70 65 |es. The |patch pe|
|00002fe0| 72 73 69 73 74 73 20 75 | 6e 74 69 6c 20 72 65 62 |rsists u|ntil reb|
|00002ff0| 6f 6f 74 2e 20 49 74 20 | 69 73 20 75 6e 6c 69 6b |oot. It |is unlik|
|00003000| 65 6c 79 20 74 68 61 74 | 20 79 6f 75 20 77 69 6c |ely that| you wil|
|00003010| 6c 20 6e 65 65 64 0d 74 | 6f 20 63 61 6c 6c 20 74 |l need.t|o call t|
|00003020| 68 69 73 20 65 78 70 6c | 69 63 69 74 6c 79 2c 20 |his expl|icitly, |
|00003030| 50 61 74 63 68 4d 61 63 | 49 49 63 69 56 69 64 65 |PatchMac|IIciVide|
|00003040| 6f 44 72 69 76 65 72 28 | 29 20 69 73 20 61 75 74 |oDriver(|) is aut|
|00003050| 6f 6d 61 74 69 63 61 6c | 6c 79 20 69 6e 76 6f 6b |omatical|ly invok|
|00003060| 65 64 20 74 68 65 0d 66 | 69 72 73 74 20 74 69 6d |ed the.f|irst tim|
|00003070| 65 20 47 44 47 65 74 45 | 6e 74 72 69 65 73 20 69 |e GDGetE|ntries i|
|00003080| 73 20 63 61 6c 6c 65 64 | 2e 20 54 68 65 20 4d 61 |s called|. The Ma|
|00003090| 63 20 49 49 63 69 20 62 | 75 69 6c 74 2d 69 6e 20 |c IIci b|uilt-in |
|000030a0| 76 69 64 65 6f 20 64 72 | 69 76 65 72 0d 28 2e 44 |video dr|iver.(.D|
|000030b0| 69 73 70 6c 61 79 5f 56 | 69 64 65 6f 5f 41 70 70 |isplay_V|ideo_App|
|000030c0| 6c 65 5f 52 42 56 31 20 | 64 72 69 76 65 72 2c 20 |le_RBV1 |driver, |
|000030d0| 76 65 72 73 69 6f 6e 20 | 30 29 20 68 61 73 20 61 |version |0) has a|
|000030e0| 20 62 75 67 20 74 68 61 | 74 20 63 61 75 73 65 73 | bug tha|t causes|
|000030f0| 20 69 74 20 74 6f 20 63 | 72 61 73 68 0d 69 66 20 | it to c|rash.if |
|00003100| 79 6f 75 20 74 72 79 20 | 74 6f 20 64 6f 20 61 20 |you try |to do a |
|00003110| 47 65 74 45 6e 74 72 69 | 65 73 20 53 74 61 74 75 |GetEntri|es Statu|
|00003120| 73 20 72 65 71 75 65 73 | 74 2e 20 50 61 74 63 68 |s reques|t. Patch|
|00003130| 4d 61 63 49 49 63 69 56 | 69 64 65 6f 44 72 69 76 |MacIIciV|ideoDriv|
|00003140| 65 72 28 29 20 66 69 6e | 64 73 20 61 6e 64 0d 70 |er() fin|ds and.p|
|00003150| 61 74 63 68 65 73 20 74 | 68 65 20 63 6f 70 79 20 |atches t|he copy |
|00003160| 6f 66 20 74 68 65 20 62 | 75 67 67 79 20 64 72 69 |of the b|uggy dri|
|00003170| 76 65 72 20 72 65 73 69 | 64 69 6e 67 20 69 6e 20 |ver resi|ding in |
|00003180| 6d 65 6d 6f 72 79 2e 20 | 28 49 66 20 74 68 65 20 |memory. |(If the |
|00003190| 64 72 69 76 65 72 20 69 | 73 0d 52 4f 4d 2d 62 61 |driver i|s.ROM-ba|
|000031a0| 73 65 64 20 69 74 20 66 | 69 72 73 74 20 6d 6f 76 |sed it f|irst mov|
|000031b0| 65 73 20 69 74 20 74 6f | 20 52 41 4d 2c 20 61 6e |es it to| RAM, an|
|000031c0| 64 20 74 68 65 6e 20 70 | 61 74 63 68 65 73 20 74 |d then p|atches t|
|000031d0| 68 61 74 2e 29 20 4f 6e | 6c 79 20 74 77 6f 20 69 |hat.) On|ly two i|
|000031e0| 6e 73 74 72 75 63 74 69 | 6f 6e 73 0d 61 72 65 20 |nstructi|ons.are |
|000031f0| 6d 6f 64 69 66 69 65 64 | 2c 20 74 6f 20 73 61 76 |modified|, to sav|
|00003200| 65 20 26 20 72 65 73 74 | 6f 72 65 20 6d 6f 72 65 |e & rest|ore more|
|00003210| 20 72 65 67 69 73 74 65 | 72 73 2e 20 54 68 69 73 | registe|rs. This|
|00003220| 20 66 69 78 20 70 65 72 | 73 69 73 74 73 20 6f 6e | fix per|sists on|
|00003230| 6c 79 20 75 6e 74 69 6c | 20 74 68 65 0d 6e 65 78 |ly until| the.nex|
|00003240| 74 20 72 65 62 6f 6f 74 | 2e 20 49 66 20 74 68 65 |t reboot|. If the|
|00003250| 20 70 61 74 63 68 20 69 | 73 20 73 75 63 63 65 73 | patch i|s succes|
|00003260| 73 66 75 6c 6c 79 20 61 | 70 70 6c 69 65 64 20 74 |sfully a|pplied t|
|00003270| 68 65 20 76 65 72 73 69 | 6f 6e 20 6e 75 6d 62 65 |he versi|on numbe|
|00003280| 72 20 69 73 20 69 6e 63 | 72 65 61 73 65 64 0d 62 |r is inc|reased.b|
|00003290| 79 20 31 30 30 2e 0d 0d | 4e 4f 54 45 53 3a 0d 0d |y 100...|NOTES:..|
|000032a0| 53 65 76 65 72 61 6c 20 | 62 75 67 73 20 69 6e 20 |Several |bugs in |
|000032b0| 76 65 72 73 69 6f 6e 20 | 32 20 28 69 6e 20 53 79 |version |2 (in Sy|
|000032c0| 73 74 65 6d 20 b2 36 2e | 30 33 29 20 6f 66 20 74 |stem .6.|03) of t|
|000032d0| 68 65 20 76 69 64 65 6f | 20 64 72 69 76 65 72 20 |he video| driver |
|000032e0| 66 6f 72 20 41 70 70 6c | 65 27 73 0d 22 54 6f 62 |for Appl|e's."Tob|
|000032f0| 79 20 46 72 61 6d 65 20 | 42 75 66 66 65 72 22 20 |y Frame |Buffer" |
|00003300| 76 69 64 65 6f 20 63 61 | 72 64 20 74 68 61 74 20 |video ca|rd that |
|00003310| 61 66 66 65 63 74 65 64 | 20 75 73 65 20 6f 66 20 |affected| use of |
|00003320| 74 68 65 20 47 65 74 47 | 61 6d 6d 61 20 63 61 6c |the GetG|amma cal|
|00003330| 6c 20 77 65 72 65 0d 66 | 69 78 65 64 20 69 6e 20 |l were.f|ixed in |
|00003340| 76 65 72 73 69 6f 6e 20 | 33 20 28 69 6e 20 53 79 |version |3 (in Sy|
|00003350| 73 74 65 6d 20 36 2e 30 | 34 29 2c 20 61 70 70 61 |stem 6.0|4), appa|
|00003360| 72 65 6e 74 6c 79 20 69 | 6e 20 72 65 73 70 6f 6e |rently i|n respon|
|00003370| 73 65 20 74 6f 20 6d 79 | 20 62 75 67 20 72 65 70 |se to my| bug rep|
|00003380| 6f 72 74 20 74 6f 0d 41 | 70 70 6c 65 2e 0d 0d 54 |ort to.A|pple...T|
|00003390| 68 65 20 63 6f 6e 74 72 | 6f 6c 2f 73 74 61 74 75 |he contr|ol/statu|
|000033a0| 73 2d 63 61 6c 6c 20 70 | 61 72 61 6d 65 74 65 72 |s-call p|arameter|
|000033b0| 20 69 6e 20 61 20 47 44 | 43 6f 6e 74 72 6f 6c 20 | in a GD|Control |
|000033c0| 6f 72 20 47 44 53 74 61 | 74 75 73 20 63 61 6c 6c |or GDSta|tus call|
|000033d0| 20 73 70 65 63 69 66 69 | 65 73 20 77 68 61 74 0d | specifi|es what.|
|000033e0| 79 6f 75 20 77 61 6e 74 | 20 64 6f 6e 65 2e 20 53 |you want| done. S|
|000033f0| 65 65 20 44 65 73 69 67 | 6e 69 6e 67 20 43 61 72 |ee Desig|ning Car|
|00003400| 64 73 20 61 6e 64 20 44 | 72 69 76 65 72 73 2c 20 |ds and D|rivers, |
|00003410| 33 72 64 20 45 64 69 74 | 69 6f 6e 2c 20 43 68 61 |3rd Edit|ion, Cha|
|00003420| 70 74 65 72 20 39 2e 20 | 28 41 20 66 65 77 0d 6e |pter 9. |(A few.n|
|00003430| 65 77 20 63 61 6c 6c 73 | 20 61 72 65 20 64 6f 63 |ew calls| are doc|
|00003440| 75 6d 65 6e 74 65 64 20 | 69 6e 20 74 68 65 20 44 |umented |in the D|
|00003450| 69 73 70 6c 61 79 20 44 | 65 76 69 63 65 20 44 72 |isplay D|evice Dr|
|00003460| 69 76 65 72 20 47 75 69 | 64 65 20 44 65 76 65 6c |iver Gui|de Devel|
|00003470| 6f 70 65 72 20 4e 6f 74 | 65 2e 29 0d 20 4e 6f 74 |oper Not|e.). Not|
|00003480| 65 20 74 68 61 74 20 73 | 6f 6d 65 74 69 6d 65 20 |e that s|ometime |
|00003490| 61 72 6f 75 6e 64 20 31 | 39 39 30 20 41 70 70 6c |around 1|990 Appl|
|000034a0| 65 20 72 65 6e 61 6d 65 | 64 20 73 6f 6d 65 20 6f |e rename|d some o|
|000034b0| 66 20 74 68 65 20 43 6f | 6e 74 72 6f 6c 20 61 6e |f the Co|ntrol an|
|000034c0| 64 20 53 74 61 74 75 73 | 0d 63 61 6c 6c 73 2c 20 |d Status|.calls, |
|000034d0| 67 69 76 69 6e 67 20 74 | 68 65 6d 20 6e 61 6d 65 |giving t|hem name|
|000034e0| 73 20 74 68 61 74 20 62 | 65 74 74 65 72 20 72 65 |s that b|etter re|
|000034f0| 66 6c 65 63 74 20 74 68 | 65 69 72 20 66 75 6e 63 |flect th|eir func|
|00003500| 74 69 6f 6e 2e 20 49 20 | 66 6f 6c 6c 6f 77 65 64 |tion. I |followed|
|00003510| 20 73 75 69 74 2e 0d 48 | 6f 77 65 76 65 72 2c 20 | suit..H|owever, |
|00003520| 41 70 70 6c 65 20 6e 65 | 67 6c 65 63 74 65 64 20 |Apple ne|glected |
|00003530| 74 6f 20 75 70 64 61 74 | 65 20 74 68 65 69 72 20 |to updat|e their |
|00003540| 62 6f 6f 6b 2c 20 44 65 | 73 69 67 6e 69 6e 67 20 |book, De|signing |
|00003550| 43 61 72 64 73 20 61 6e | 64 20 44 72 69 76 65 72 |Cards an|d Driver|
|00003560| 73 2c 20 6e 6f 77 0d 69 | 6e 20 69 74 73 20 33 72 |s, now.i|n its 3r|
|00003570| 64 20 65 64 69 74 69 6f | 6e 2e 20 46 6f 72 74 75 |d editio|n. Fortu|
|00003580| 6e 61 74 65 6c 79 2c 20 | 74 68 65 79 20 64 65 66 |nately, |they def|
|00003590| 69 6e 65 20 62 6f 74 68 | 20 6e 61 6d 65 73 20 69 |ine both| names i|
|000035a0| 6e 20 74 68 65 69 72 20 | 56 69 64 65 6f 2e 68 20 |n their |Video.h |
|000035b0| 68 65 61 64 65 72 0d 66 | 69 6c 65 2e 20 54 6f 20 |header.f|ile. To |
|000035c0| 61 76 6f 69 64 20 63 6f | 6e 66 75 73 69 6f 6e 2c |avoid co|nfusion,|
|000035d0| 20 68 65 72 65 20 61 72 | 65 20 74 68 65 20 65 71 | here ar|e the eq|
|000035e0| 75 69 76 61 6c 65 6e 63 | 65 73 2e 20 4e 6f 74 65 |uivalenc|es. Note|
|000035f0| 20 74 68 61 74 20 22 63 | 73 63 22 20 73 74 61 6e | that "c|sc" stan|
|00003600| 64 73 20 66 6f 72 0d 22 | 43 6f 6e 74 72 6f 6c 20 |ds for."|Control |
|00003610| 61 6e 64 20 53 74 61 74 | 75 73 20 43 61 6c 6c 22 |and Stat|us Call"|
|00003620| 0d 43 6f 6e 74 72 6f 6c | 20 63 61 6c 6c 3a 0d 20 |.Control| call:. |
|00003630| 63 73 63 47 72 61 79 50 | 61 67 65 20 3d 20 20 63 |cscGrayP|age = c|
|00003640| 73 63 47 72 61 79 53 63 | 72 65 65 6e 20 3d 20 35 |scGraySc|reen = 5|
|00003650| 0d 53 74 61 74 75 73 20 | 63 61 6c 6c 73 3a 0d 20 |.Status |calls:. |
|00003660| 63 73 63 47 65 74 50 61 | 67 65 43 6e 74 20 3d 20 |cscGetPa|geCnt = |
|00003670| 63 73 63 47 65 74 50 61 | 67 65 73 20 3d 20 34 0d |cscGetPa|ges = 4.|
|00003680| 20 63 73 63 47 65 74 50 | 61 67 65 42 61 73 65 20 | cscGetP|ageBase |
|00003690| 3d 20 63 73 63 47 65 74 | 42 61 73 65 41 64 64 72 |= cscGet|BaseAddr|
|000036a0| 20 3d 20 35 0d 0d 42 61 | 73 65 64 20 6f 6e 3a 0d | = 5..Ba|sed on:.|
|000036b0| 49 6e 73 69 64 65 20 4d | 61 63 69 6e 74 6f 73 68 |Inside M|acintosh|
|000036c0| 2d 49 49 20 28 44 65 76 | 69 63 65 20 4d 61 6e 61 |-II (Dev|ice Mana|
|000036d0| 67 65 72 29 0d 44 65 73 | 69 67 6e 69 6e 67 20 43 |ger).Des|igning C|
|000036e0| 61 72 64 73 20 61 6e 64 | 20 44 72 69 76 65 72 73 |ards and| Drivers|
|000036f0| 2c 20 33 72 64 20 45 64 | 69 74 69 6f 6e 2c 20 43 |, 3rd Ed|ition, C|
|00003700| 68 61 70 74 65 72 20 39 | 2e 0d 44 69 73 70 6c 61 |hapter 9|..Displa|
|00003710| 79 20 44 65 76 69 63 65 | 20 44 72 69 76 65 72 20 |y Device| Driver |
|00003720| 47 75 69 64 65 20 44 65 | 76 65 6c 6f 70 65 72 20 |Guide De|veloper |
|00003730| 4e 6f 74 65 20 6f 6e 20 | 74 68 65 20 4a 61 6e 75 |Note on |the Janu|
|00003740| 61 72 79 20 27 39 34 20 | 44 65 76 65 6c 6f 70 65 |ary '94 |Develope|
|00003750| 72 20 43 44 2e 0d 54 65 | 63 68 20 4e 6f 74 65 20 |r CD..Te|ch Note |
|00003760| 32 36 32 3a 20 22 43 6f | 6e 74 72 6f 6c 6c 69 6e |262: "Co|ntrollin|
|00003770| 67 20 53 74 61 74 75 73 | 20 43 61 6c 6c 73 22 0d |g Status| Calls".|
|00003780| 22 47 72 65 79 53 63 61 | 6c 65 20 49 6e 66 6f 72 |"GreySca|le Infor|
|00003790| 6d 61 74 69 6f 6e 22 20 | 66 72 6f 6d 20 41 70 70 |mation" |from App|
|000037a0| 6c 65 4c 69 6e 6b 20 22 | 41 70 70 6c 65 20 54 65 |leLink "|Apple Te|
|000037b0| 63 68 6e 69 63 61 6c 20 | 49 6e 66 6f 22 0d 22 56 |chnical |Info"."V|
|000037c0| 69 64 65 6f 20 43 6f 6e | 66 69 67 75 72 61 74 69 |ideo Con|figurati|
|000037d0| 6f 6e 20 52 4f 4d 20 53 | 6f 66 74 77 61 72 65 20 |on ROM S|oftware |
|000037e0| 53 70 65 63 69 66 69 63 | 61 74 69 6f 6e 22 20 61 |Specific|ation" a|
|000037f0| 6c 73 6f 20 66 72 6f 6d | 20 41 70 70 6c 65 4c 69 |lso from| AppleLi|
|00003800| 6e 6b 2c 0d 69 6e 20 22 | 44 65 76 65 6c 6f 70 65 |nk,.in "|Develope|
|00003810| 72 20 54 65 63 68 20 53 | 75 70 70 6f 72 74 3a 4d |r Tech S|upport:M|
|00003820| 61 63 69 6e 74 6f 73 68 | 3a 33 32 20 42 69 74 20 |acintosh|:32 Bit |
|00003830| 51 75 69 63 6b 44 72 61 | 77 22 0d 0d 4e 4f 54 45 |QuickDra|w"..NOTE|
|00003840| 53 3a 0d 54 6f 6d 20 42 | 75 73 65 79 20 28 62 75 |S:.Tom B|usey (bu|
|00003850| 73 65 79 40 69 6e 64 69 | 61 6e 61 2e 65 64 75 29 |sey@indi|ana.edu)|
|00003860| 20 77 72 69 74 65 73 3a | 20 22 49 27 6d 20 75 73 | writes:| "I'm us|
|00003870| 69 6e 67 20 61 6e 20 38 | 2d 62 69 74 20 53 75 70 |ing an 8|-bit Sup|
|00003880| 65 72 4d 61 63 20 43 6f | 6c 6f 72 43 61 72 64 0d |erMac Co|lorCard.|
|00003890| 74 68 61 74 20 61 20 75 | 73 65 64 20 63 6f 6d 70 |that a u|sed comp|
|000038a0| 75 74 65 72 20 64 65 61 | 6c 65 72 20 67 61 76 65 |uter dea|ler gave|
|000038b0| 20 6d 65 20 77 68 65 6e | 20 49 20 6f 72 64 65 72 | me when| I order|
|000038c0| 65 64 20 61 20 54 6f 62 | 79 20 63 61 72 64 2e 20 |ed a Tob|y card. |
|000038d0| 49 20 64 69 73 63 6f 76 | 65 72 65 64 0d 74 68 61 |I discov|ered.tha|
|000038e0| 74 20 74 68 65 20 73 74 | 61 74 75 73 20 61 6e 64 |t the st|atus and|
|000038f0| 20 63 6f 6e 74 72 6f 6c | 20 63 61 6c 6c 73 20 66 | control| calls f|
|00003900| 6f 72 20 47 44 55 6e 63 | 6f 72 72 65 63 74 65 64 |or GDUnc|orrected|
|00003910| 47 61 6d 6d 61 20 72 65 | 74 75 72 6e 20 2d 31 37 |Gamma re|turn -17|
|00003920| 20 61 6e 64 20 2d 31 38 | 0d 72 65 73 70 65 63 74 | and -18|.respect|
|00003930| 69 76 65 6c 79 2c 20 77 | 68 69 63 68 20 6d 65 61 |ively, w|hich mea|
|00003940| 6e 73 20 74 68 61 74 20 | 74 68 65 20 64 72 69 76 |ns that |the driv|
|00003950| 65 72 20 64 6f 65 73 6e | 27 74 20 73 75 70 70 6f |er doesn|'t suppo|
|00003960| 72 74 20 64 69 66 66 65 | 72 65 6e 74 20 67 61 6d |rt diffe|rent gam|
|00003970| 6d 61 73 2e 0d 47 44 55 | 6e 63 6f 72 72 65 63 74 |mas..GDU|ncorrect|
|00003980| 65 64 47 61 6d 6d 61 20 | 72 65 74 75 72 6e 73 20 |edGamma |returns |
|00003990| 61 6e 20 65 72 72 6f 72 | 20 6d 65 73 73 61 67 65 |an error| message|
|000039a0| 2c 20 62 75 74 20 47 44 | 4f 70 65 6e 57 69 6e 64 |, but GD|OpenWind|
|000039b0| 6f 77 20 64 6f 65 73 6e | 27 74 20 75 73 65 20 74 |ow doesn|'t use t|
|000039c0| 68 65 0d 65 72 72 6f 72 | 20 6d 65 73 73 61 67 65 |he.error| message|
|000039d0| 20 6f 72 20 70 61 73 73 | 20 69 74 20 62 61 63 6b | or pass| it back|
|000039e0| 20 74 6f 20 74 68 65 20 | 63 61 6c 6c 69 6e 67 20 | to the |calling |
|000039f0| 70 72 6f 67 72 61 6d 2e | 20 49 27 6d 20 77 6f 6e |program.| I'm won|
|00003a00| 64 65 72 69 6e 67 20 69 | 66 20 74 68 65 72 65 20 |dering i|f there |
|00003a10| 61 72 65 0d 70 65 6f 70 | 6c 65 20 75 73 69 6e 67 |are.peop|le using|
|00003a20| 20 47 44 4f 70 65 6e 57 | 69 6e 64 6f 77 20 77 68 | GDOpenW|indow wh|
|00003a30| 6f 20 74 68 69 6e 6b 20 | 74 68 61 74 20 74 68 65 |o think |that the|
|00003a40| 79 20 61 72 65 20 67 65 | 74 74 69 6e 67 20 61 20 |y are ge|tting a |
|00003a50| 6c 69 6e 65 61 72 20 67 | 61 6d 6d 61 20 62 75 74 |linear g|amma but|
|00003a60| 20 77 68 6f 0d 61 72 65 | 20 61 63 74 75 61 6c 6c | who.are| actuall|
|00003a70| 79 20 67 65 74 74 69 6e | 67 20 61 6e 20 65 72 72 |y gettin|g an err|
|00003a80| 6f 72 20 6d 65 73 73 61 | 67 65 20 61 6e 64 20 6e |or messa|ge and n|
|00003a90| 6f 74 20 6c 65 61 72 6e | 69 6e 67 20 61 62 6f 75 |ot learn|ing abou|
|00003aa0| 74 20 69 74 2e 22 0d 20 | 20 20 20 20 54 6f 6d 27 |t it.". | Tom'|
|00003ab0| 73 20 66 61 63 74 73 20 | 61 72 65 20 72 69 67 68 |s facts |are righ|
|00003ac0| 74 2c 20 62 75 74 20 68 | 65 20 6e 65 65 64 6e 27 |t, but h|e needn'|
|00003ad0| 74 20 77 6f 72 72 79 2e | 20 41 20 66 65 77 20 76 |t worry.| A few v|
|00003ae0| 69 64 65 6f 20 64 72 69 | 76 65 72 73 2c 20 65 2e |ideo dri|vers, e.|
|00003af0| 67 2e 0d 52 61 64 69 75 | 73 20 50 6f 77 65 72 56 |g..Radiu|s PowerV|
|00003b00| 69 65 77 2c 20 61 6e 64 | 20 61 70 70 61 72 65 6e |iew, and| apparen|
|00003b10| 74 6c 79 20 74 68 65 20 | 53 75 70 65 72 4d 61 63 |tly the |SuperMac|
|00003b20| 20 43 6f 6c 6f 72 43 61 | 72 64 2c 20 64 6f 6e 27 | ColorCa|rd, don'|
|00003b30| 74 20 69 6d 70 6c 65 6d | 65 6e 74 20 67 61 6d 6d |t implem|ent gamm|
|00003b40| 61 0d 74 61 62 6c 65 73 | 20 61 74 20 61 6c 6c 2c |a.tables| at all,|
|00003b50| 20 62 75 74 20 74 68 65 | 20 65 72 72 6f 72 20 66 | but the| error f|
|00003b60| 72 6f 6d 20 47 44 55 6e | 63 6f 72 72 65 63 74 65 |rom GDUn|correcte|
|00003b70| 64 47 61 6d 6d 61 20 69 | 73 20 70 72 6f 62 61 62 |dGamma i|s probab|
|00003b80| 6c 79 20 6e 6f 74 20 61 | 20 63 6f 6e 63 65 72 6e |ly not a| concern|
|00003b90| 2e 0d 54 68 65 20 72 65 | 61 6c 20 74 65 73 74 20 |..The re|al test |
|00003ba0| 69 73 20 74 6f 20 72 75 | 6e 20 54 69 6d 65 56 69 |is to ru|n TimeVi|
|00003bb0| 64 65 6f 2e 20 54 69 6d | 65 56 69 64 65 6f 20 64 |deo. Tim|eVideo d|
|00003bc0| 6f 65 73 20 61 20 77 72 | 69 74 65 2d 61 6e 64 2d |oes a wr|ite-and-|
|00003bd0| 72 65 61 64 2d 62 61 63 | 6b 20 74 65 73 74 20 6f |read-bac|k test o|
|00003be0| 66 0d 74 68 65 20 63 6c | 75 74 20 6f 66 20 79 6f |f.the cl|ut of yo|
|00003bf0| 75 72 20 76 69 64 65 6f | 20 63 61 72 64 2e 20 49 |ur video| card. I|
|00003c00| 66 20 74 68 61 74 20 74 | 65 73 74 20 70 61 73 73 |f that t|est pass|
|00003c10| 65 73 20 74 68 65 6e 20 | 79 6f 75 20 63 61 6e 20 |es then |you can |
|00003c20| 73 61 66 65 6c 79 20 63 | 6f 6e 63 6c 75 64 65 0d |safely c|onclude.|
|00003c30| 74 68 61 74 20 74 68 65 | 72 65 27 73 20 6e 6f 20 |that the|re's no |
|00003c40| 67 61 6d 6d 61 20 74 72 | 61 6e 73 6c 61 74 69 6f |gamma tr|anslatio|
|00003c50| 6e 20 67 6f 69 6e 67 20 | 6f 6e 2e 20 53 6f 2c 20 |n going |on. So, |
|00003c60| 61 73 20 6e 65 61 72 6c | 79 20 65 76 65 72 79 20 |as nearl|y every |
|00003c70| 64 6f 63 75 6d 65 6e 74 | 20 69 6e 20 74 68 65 0d |document| in the.|
|00003c80| 56 69 64 65 6f 54 6f 6f | 6c 62 6f 78 20 73 61 79 |VideoToo|lbox say|
|00003c90| 73 3a 20 72 75 6e 20 54 | 69 6d 65 56 69 64 65 6f |s: run T|imeVideo|
|00003ca0| 20 61 6e 64 20 72 65 61 | 64 20 74 68 65 20 72 65 | and rea|d the re|
|00003cb0| 70 6f 72 74 2e 0d 20 20 | 20 20 20 48 65 72 65 27 |port.. | Here'|
|00003cc0| 73 20 68 6f 77 20 67 61 | 6d 6d 61 20 74 61 62 6c |s how ga|mma tabl|
|00003cd0| 65 73 20 77 6f 72 6b 2e | 20 41 63 63 6f 72 64 69 |es work.| Accordi|
|00003ce0| 6e 67 20 74 6f 20 74 68 | 65 20 41 70 70 6c 65 20 |ng to th|e Apple |
|00003cf0| 6d 61 6e 75 61 6c 20 28 | 44 65 73 69 67 6e 69 6e |manual (|Designin|
|00003d00| 67 0d 43 61 72 64 73 20 | 61 6e 64 20 44 72 69 76 |g.Cards |and Driv|
|00003d10| 65 72 73 29 2c 20 74 68 | 65 20 76 61 6c 75 65 73 |ers), th|e values|
|00003d20| 20 69 6e 20 74 68 65 20 | 72 67 62 20 74 72 69 70 | in the |rgb trip|
|00003d30| 6c 65 74 73 20 74 68 61 | 74 20 79 6f 75 20 73 75 |lets tha|t you su|
|00003d40| 70 70 6c 79 20 69 6e 20 | 61 0d 63 73 63 53 65 74 |pply in |a.cscSet|
|00003d50| 45 6e 74 72 69 65 73 20 | 63 61 6c 6c 20 74 6f 20 |Entries |call to |
|00003d60| 74 68 65 20 76 69 64 65 | 6f 20 64 72 69 76 65 72 |the vide|o driver|
|00003d70| 20 61 72 65 20 66 69 72 | 73 74 20 74 72 61 6e 73 | are fir|st trans|
|00003d80| 6c 61 74 65 64 20 76 69 | 61 20 74 68 65 20 67 61 |lated vi|a the ga|
|00003d90| 6d 6d 61 20 74 61 62 6c | 65 0d 28 65 61 63 68 20 |mma tabl|e.(each |
|00003da0| 72 2c 67 2c 20 61 6e 64 | 20 62 20 63 6f 6d 70 6f |r,g, and| b compo|
|00003db0| 6e 65 6e 74 20 73 65 70 | 61 72 61 74 65 6c 79 29 |nent sep|arately)|
|00003dc0| 20 62 65 66 6f 72 65 20 | 62 65 69 6e 67 20 6c 6f | before |being lo|
|00003dd0| 61 64 65 64 20 69 6e 74 | 6f 20 74 68 65 20 43 4c |aded int|o the CL|
|00003de0| 55 54 0d 68 61 72 64 77 | 61 72 65 20 74 61 62 6c |UT.hardw|are tabl|
|00003df0| 65 2e 20 4d 6f 73 74 20 | 64 72 69 76 65 72 73 20 |e. Most |drivers |
|00003e00| 6d 61 69 6e 74 61 69 6e | 20 61 20 67 61 6d 6d 61 |maintain| a gamma|
|00003e10| 20 74 61 62 6c 65 20 69 | 6e 74 65 72 6e 61 6c 6c | table i|nternall|
|00003e20| 79 20 28 69 6e 20 63 6f | 6d 70 75 74 65 72 0d 6d |y (in co|mputer.m|
|00003e30| 65 6d 6f 72 79 29 20 61 | 6e 64 20 61 6c 6c 6f 77 |emory) a|nd allow|
|00003e40| 20 79 6f 75 20 74 6f 20 | 67 65 74 20 61 6e 64 20 | you to |get and |
|00003e50| 73 65 74 20 69 74 20 76 | 69 61 20 74 68 65 20 63 |set it v|ia the c|
|00003e60| 73 63 47 65 74 47 61 6d | 6d 61 20 61 6e 64 20 63 |scGetGam|ma and c|
|00003e70| 73 63 53 65 74 47 61 6d | 6d 61 0d 63 61 6c 6c 73 |scSetGam|ma.calls|
|00003e80| 2e 20 41 20 66 65 77 20 | 76 69 64 65 6f 20 64 72 |. A few |video dr|
|00003e90| 69 76 65 72 73 20 28 52 | 61 64 69 75 73 20 50 6f |ivers (R|adius Po|
|00003ea0| 77 65 72 56 69 65 77 2c | 20 53 75 70 65 72 4d 61 |werView,| SuperMa|
|00003eb0| 63 20 43 6f 6c 6f 72 43 | 61 72 64 29 20 64 6f 6e |c ColorC|ard) don|
|00003ec0| 27 74 20 73 75 70 70 6f | 72 74 0d 67 61 6d 6d 61 |'t suppo|rt.gamma|
|00003ed0| 20 74 61 62 6c 65 73 2e | 20 54 68 65 79 20 6c 6f | tables.| They lo|
|00003ee0| 61 64 20 79 6f 75 72 20 | 72 67 62 20 76 61 6c 75 |ad your |rgb valu|
|00003ef0| 65 73 20 64 69 72 65 63 | 74 6c 79 20 69 6e 74 6f |es direc|tly into|
|00003f00| 20 74 68 65 20 43 4c 55 | 54 2c 20 77 69 74 68 6f | the CLU|T, witho|
|00003f10| 75 74 0d 74 72 61 6e 73 | 6c 61 74 69 6f 6e 2e 20 |ut.trans|lation. |
|00003f20| 48 6f 77 65 76 65 72 2c | 20 66 6f 72 20 75 73 65 |However,| for use|
|00003f30| 72 73 20 6f 66 20 74 68 | 65 20 56 69 64 65 6f 54 |rs of th|e VideoT|
|00003f40| 6f 6f 6c 62 6f 78 20 74 | 68 61 74 27 73 20 75 73 |oolbox t|hat's us|
|00003f50| 75 61 6c 6c 79 20 66 69 | 6e 65 2c 20 73 69 6e 63 |ually fi|ne, sinc|
|00003f60| 65 0d 74 68 61 74 27 73 | 20 65 78 61 63 74 6c 79 |e.that's| exactly|
|00003f70| 20 74 68 65 20 62 65 68 | 61 76 69 6f 72 20 74 68 | the beh|avior th|
|00003f80| 61 74 20 77 65 20 72 6f | 75 74 69 6e 65 6c 79 20 |at we ro|utinely |
|00003f90| 72 65 71 75 65 73 74 20 | 62 79 20 63 61 6c 6c 69 |request |by calli|
|00003fa0| 6e 67 0d 47 44 55 6e 63 | 6f 72 72 65 63 74 65 64 |ng.GDUnc|orrected|
|00003fb0| 47 61 6d 6d 61 2e 20 4f | 66 20 63 6f 75 72 73 65 |Gamma. O|f course|
|00003fc0| 2c 20 69 66 20 79 6f 75 | 20 77 61 6e 74 20 74 6f |, if you| want to|
|00003fd0| 20 6c 6f 61 64 20 61 20 | 63 75 73 74 6f 6d 20 67 | load a |custom g|
|00003fe0| 61 6d 6d 61 20 74 61 62 | 6c 65 2c 20 6f 74 68 65 |amma tab|le, othe|
|00003ff0| 72 0d 74 68 61 6e 20 74 | 68 65 20 69 64 65 6e 74 |r.than t|he ident|
|00004000| 69 74 79 20 74 72 61 6e | 73 66 6f 72 6d 61 74 69 |ity tran|sformati|
|00004010| 6f 6e 2c 20 74 68 65 6e | 20 79 6f 75 27 6c 6c 20 |on, then| you'll |
|00004020| 62 65 20 63 61 6c 6c 69 | 6e 67 20 47 44 53 65 74 |be calli|ng GDSet|
|00004030| 47 61 6d 6d 61 2c 20 61 | 6e 64 20 79 6f 75 0d 73 |Gamma, a|nd you.s|
|00004040| 68 6f 75 6c 64 20 6d 61 | 6b 65 20 73 75 72 65 20 |hould ma|ke sure |
|00004050| 69 74 20 64 6f 65 73 20 | 6e 6f 74 20 72 65 74 75 |it does |not retu|
|00004060| 72 6e 20 61 6e 20 65 72 | 72 6f 72 2e 20 28 41 6c |rn an er|ror. (Al|
|00004070| 61 73 2c 20 74 68 65 20 | 52 61 64 69 75 73 20 50 |as, the |Radius P|
|00004080| 6f 77 65 72 56 69 65 77 | 20 64 72 69 76 65 72 0d |owerView| driver.|
|00004090| 6d 6f 72 65 20 6f 72 20 | 6c 65 73 73 20 69 67 6e |more or |less ign|
|000040a0| 6f 72 65 73 20 74 68 65 | 20 63 73 63 53 65 74 47 |ores the| cscSetG|
|000040b0| 61 6d 6d 61 20 61 6e 64 | 20 63 73 63 47 65 74 47 |amma and| cscGetG|
|000040c0| 61 6d 6d 61 20 72 65 71 | 75 65 73 74 73 2d 2d 47 |amma req|uests--G|
|000040d0| 44 47 65 74 47 61 6d 6d | 61 0d 72 65 74 75 72 6e |DGetGamm|a.return|
|000040e0| 73 20 61 20 74 61 62 6c | 65 20 74 68 61 74 27 73 |s a tabl|e that's|
|000040f0| 20 61 6c 6c 20 7a 65 72 | 6f 65 73 2d 2d 62 75 74 | all zer|oes--but|
|00004100| 20 74 68 65 20 64 72 69 | 76 65 72 20 66 61 69 6c | the dri|ver fail|
|00004110| 73 20 74 6f 20 72 65 70 | 6f 72 74 20 61 6e 20 65 |s to rep|ort an e|
|00004120| 72 72 6f 72 2e 20 49 0d | 77 72 6f 74 65 20 74 6f |rror. I.|wrote to|
|00004130| 20 74 68 65 20 52 61 64 | 69 75 73 20 70 72 6f 67 | the Rad|ius prog|
|00004140| 72 61 6d 6d 65 72 20 61 | 20 79 65 61 72 20 61 67 |rammer a| year ag|
|00004150| 6f 2c 20 62 75 74 20 74 | 68 65 79 27 72 65 20 6e |o, but t|hey're n|
|00004160| 6f 20 6c 6f 6e 67 65 72 | 20 69 6e 74 65 72 65 73 |o longer| interes|
|00004170| 74 65 64 20 69 6e 0d 77 | 6f 72 6b 69 6e 67 20 6f |ted in.w|orking o|
|00004180| 6e 20 74 68 61 74 20 70 | 72 6f 64 75 63 74 2e 29 |n that p|roduct.)|
|00004190| 0d 09 50 61 74 72 69 63 | 6b 20 46 6c 61 6e 61 67 |..Patric|k Flanag|
|000041a0| 61 6e 20 28 66 6c 61 6e | 61 67 61 6e 40 64 65 61 |an (flan|agan@dea|
|000041b0| 6b 69 6e 2e 65 64 75 2e | 61 75 29 20 77 72 69 74 |kin.edu.|au) writ|
|000041c0| 65 73 3a 20 22 43 61 6e | 20 49 20 62 65 20 31 30 |es: "Can| I be 10|
|000041d0| 30 25 20 73 75 72 65 2c | 20 69 66 20 49 0d 73 65 |0% sure,| if I.se|
|000041e0| 6c 65 63 74 20 22 53 70 | 65 63 69 61 6c 20 47 61 |lect "Sp|ecial Ga|
|000041f0| 6d 6d 61 22 2c 20 69 6e | 20 74 68 65 20 4d 6f 6e |mma", in| the Mon|
|00004200| 69 74 6f 72 73 20 43 6f | 6e 74 72 6f 6c 20 50 61 |itors Co|ntrol Pa|
|00004210| 6e 65 6c 20 61 6e 64 20 | 63 68 6f 6f 73 65 20 22 |nel and |choose "|
|00004220| 75 6e 63 6f 72 72 65 63 | 74 65 64 0d 67 61 6d 6d |uncorrec|ted.gamm|
|00004230| 61 22 20 66 6f 72 20 61 | 20 76 69 64 65 6f 20 63 |a" for a| video c|
|00004240| 61 72 64 2c 20 74 68 61 | 74 20 74 68 69 73 20 69 |ard, tha|t this i|
|00004250| 73 20 74 68 65 20 73 61 | 6d 65 20 61 73 20 75 73 |s the sa|me as us|
|00004260| 69 6e 67 20 47 44 55 6e | 63 6f 72 72 65 63 74 65 |ing GDUn|correcte|
|00004270| 64 47 61 6d 6d 61 3f 22 | 0d 52 45 50 4c 59 3a 20 |dGamma?"|.REPLY: |
|00004280| 54 68 61 74 20 69 73 20 | 77 68 61 74 20 49 20 77 |That is |what I w|
|00004290| 6f 75 6c 64 20 65 78 70 | 65 63 74 20 66 72 6f 6d |ould exp|ect from|
|000042a0| 20 72 65 61 64 69 6e 67 | 20 61 6c 6c 20 74 68 65 | reading| all the|
|000042b0| 20 72 65 6c 65 76 61 6e | 74 20 64 6f 63 75 6d 65 | relevan|t docume|
|000042c0| 6e 74 61 74 69 6f 6e 2e | 0d 48 6f 77 65 76 65 72 |ntation.|.However|
|000042d0| 2c 20 74 6f 20 62 65 20 | 31 30 30 25 20 63 65 72 |, to be |100% cer|
|000042e0| 74 61 69 6e 20 6f 66 20 | 61 6e 79 74 68 69 6e 67 |tain of |anything|
|000042f0| 20 49 20 77 6f 75 6c 64 | 20 77 61 6e 74 20 74 6f | I would| want to|
|00004300| 20 63 68 65 63 6b 20 69 | 74 20 6d 79 73 65 6c 66 | check i|t myself|
|00004310| 2e 0d 54 69 6d 65 56 69 | 64 65 6f 20 63 61 6c 6c |..TimeVi|deo call|
|00004320| 73 20 47 44 55 6e 63 6f | 72 72 65 63 74 65 64 47 |s GDUnco|rrectedG|
|00004330| 61 6d 6d 61 20 61 6e 64 | 20 74 68 65 6e 20 63 6f |amma and| then co|
|00004340| 6e 66 69 72 6d 73 20 74 | 68 61 74 20 77 72 69 74 |nfirms t|hat writ|
|00004350| 65 2d 74 68 65 6e 2d 72 | 65 61 64 20 74 65 73 74 |e-then-r|ead test|
|00004360| 73 0d 6f 66 20 74 68 65 | 20 43 4c 55 54 20 72 65 |s.of the| CLUT re|
|00004370| 74 75 72 6e 20 77 68 61 | 74 20 77 61 73 20 77 72 |turn wha|t was wr|
|00004380| 69 74 74 65 6e 2e 20 28 | 47 61 6d 6d 61 2d 74 61 |itten. (|Gamma-ta|
|00004390| 62 6c 65 20 74 72 61 6e | 73 6c 61 74 69 6f 6e 20 |ble tran|slation |
|000043a0| 69 73 20 6f 6e 6c 79 20 | 64 6f 6e 65 20 6f 6e 0d |is only |done on.|
|000043b0| 74 68 65 20 77 72 69 74 | 65 2c 20 6e 6f 74 20 75 |the writ|e, not u|
|000043c0| 6e 64 6f 6e 65 20 6f 6e | 20 74 68 65 20 72 65 61 |ndone on| the rea|
|000043d0| 64 2e 29 20 54 68 75 73 | 20 54 69 6d 65 56 69 64 |d.) Thus| TimeVid|
|000043e0| 65 6f 20 77 69 6c 6c 20 | 63 6f 6e 66 69 72 6d 20 |eo will |confirm |
|000043f0| 66 6f 72 20 79 6f 75 20 | 74 68 61 74 0d 61 66 74 |for you |that.aft|
|00004400| 65 72 20 63 61 6c 6c 69 | 6e 67 20 47 44 55 6e 63 |er calli|ng GDUnc|
|00004410| 6f 72 72 65 63 74 65 64 | 47 61 6d 6d 61 20 79 6f |orrected|Gamma yo|
|00004420| 75 72 20 76 69 64 65 6f | 20 63 61 72 64 20 68 61 |ur video| card ha|
|00004430| 73 20 77 68 61 74 20 41 | 70 70 6c 65 20 63 61 6c |s what A|pple cal|
|00004440| 6c 73 20 61 6e 0d 22 75 | 6e 63 6f 72 72 65 63 74 |ls an."u|ncorrect|
|00004450| 65 64 22 20 67 61 6d 6d | 61 20 74 61 62 6c 65 2e |ed" gamm|a table.|
|00004460| 20 48 6f 77 65 76 65 72 | 2c 20 54 69 6d 65 56 69 | However|, TimeVi|
|00004470| 64 65 6f 20 64 6f 65 73 | 20 6e 6f 74 20 63 68 65 |deo does| not che|
|00004480| 63 6b 20 77 68 61 74 20 | 79 6f 75 20 77 6f 75 6c |ck what |you woul|
|00004490| 64 20 67 65 74 0d 62 79 | 20 6d 65 72 65 6c 79 20 |d get.by| merely |
|000044a0| 73 65 6c 65 63 74 69 6e | 67 20 22 75 6e 63 6f 72 |selectin|g "uncor|
|000044b0| 72 65 63 74 65 64 22 20 | 67 61 6d 6d 61 20 69 6e |rected" |gamma in|
|000044c0| 20 74 68 65 20 4d 6f 6e | 69 74 6f 72 73 20 43 6f | the Mon|itors Co|
|000044d0| 6e 74 72 6f 6c 20 50 61 | 6e 65 6c 2e 20 49 74 20 |ntrol Pa|nel. It |
|000044e0| 77 6f 75 6c 64 0d 62 65 | 20 72 65 61 73 6f 6e 61 |would.be| reasona|
|000044f0| 62 6c 65 20 74 6f 20 61 | 73 73 75 6d 65 20 74 68 |ble to a|ssume th|
|00004500| 61 74 20 79 6f 75 20 77 | 6f 75 6c 64 20 67 65 74 |at you w|ould get|
|00004510| 20 74 68 65 20 73 61 6d | 65 20 72 65 73 75 6c 74 | the sam|e result|
|00004520| 20 73 69 6e 63 65 20 4d | 6f 6e 69 74 6f 72 73 0d | since M|onitors.|
|00004530| 69 6e 74 65 72 61 63 74 | 73 20 77 69 74 68 20 74 |interact|s with t|
|00004540| 68 65 20 76 69 64 65 6f | 20 64 72 69 76 65 72 20 |he video| driver |
|00004550| 62 79 20 74 68 65 20 73 | 61 6d 65 20 43 6f 6e 74 |by the s|ame Cont|
|00004560| 72 6f 6c 20 61 6e 64 20 | 53 74 61 74 75 73 20 43 |rol and |Status C|
|00004570| 61 6c 6c 73 20 61 73 0d | 47 44 56 69 64 65 6f 2e |alls as.|GDVideo.|
|00004580| 63 20 64 6f 65 73 2c 20 | 73 6f 20 69 74 20 6d 75 |c does, |so it mu|
|00004590| 73 74 20 75 73 65 20 74 | 68 65 20 73 61 6d 65 20 |st use t|he same |
|000045a0| 63 73 63 53 65 74 47 61 | 6d 6d 61 20 63 61 6c 6c |cscSetGa|mma call|
|000045b0| 20 61 73 20 69 73 20 75 | 73 65 64 20 62 79 0d 47 | as is u|sed by.G|
|000045c0| 44 55 6e 63 6f 72 72 65 | 63 74 65 64 47 61 6d 6d |DUncorre|ctedGamm|
|000045d0| 61 2e 0d 0d 48 49 53 54 | 4f 52 59 3a 0d 39 2f 32 |a...HIST|ORY:.9/2|
|000045e0| 39 2f 38 39 20 09 64 67 | 70 09 61 64 64 65 64 20 |9/89 .dg|p.added |
|000045f0| 63 61 75 74 69 6f 6e 20 | 61 62 6f 76 65 20 74 68 |caution |above th|
|00004600| 61 74 20 73 75 63 63 65 | 73 73 69 76 65 20 63 61 |at succe|ssive ca|
|00004610| 6c 6c 73 20 74 6f 20 53 | 65 74 45 6e 74 72 69 65 |lls to S|etEntrie|
|00004620| 73 20 6d 61 79 20 62 65 | 20 6f 6e 20 6f 6e 65 20 |s may be| on one |
|00004630| 0d 09 09 09 09 66 72 61 | 6d 65 2e 0d 31 31 2f 32 |.....fra|me..11/2|
|00004640| 31 2f 38 39 09 64 67 70 | 09 63 6f 72 72 65 63 74 |1/89.dgp|.correct|
|00004650| 65 64 20 6d 6f 64 65 20 | 6c 69 73 74 3a 20 30 78 |ed mode |list: 0x|
|00004660| 38 30 2e 2e 2e 20 61 73 | 20 70 6f 69 6e 74 65 64 |80... as| pointed|
|00004670| 20 6f 75 74 20 62 79 20 | 43 68 75 63 6b 20 53 74 | out by |Chuck St|
|00004680| 65 69 6e 0d 31 31 2f 33 | 30 2f 38 39 09 64 67 70 |ein.11/3|0/89.dgp|
|00004690| 09 61 64 64 65 64 20 6e | 6f 74 65 20 61 62 6f 76 |.added n|ote abov|
|000046a0| 65 20 66 72 6f 6d 20 44 | 6f 6e 20 4b 65 6c 6c 79 |e from D|on Kelly|
|000046b0| 2e 0d 09 09 09 09 41 64 | 64 65 64 20 63 61 75 74 |......Ad|ded caut|
|000046c0| 69 6f 6e 61 72 79 20 6e | 6f 74 65 20 61 62 6f 76 |ionary n|ote abov|
|000046d0| 65 20 61 62 6f 75 74 20 | 47 44 53 65 74 45 6e 74 |e about |GDSetEnt|
|000046e0| 72 69 65 73 28 29 2e 0d | 33 2f 31 2f 39 30 09 09 |ries()..|3/1/90..|
|000046f0| 64 67 70 09 75 70 64 61 | 74 65 64 20 63 6f 6d 6d |dgp.upda|ted comm|
|00004700| 65 6e 74 73 2e 0d 33 2f | 33 2f 39 30 09 09 64 67 |ents..3/|3/90..dg|
|00004710| 70 09 69 6e 63 6c 75 64 | 65 64 20 56 69 64 65 6f |p.includ|ed Video|
|00004720| 2e 68 20 69 6e 73 74 65 | 61 64 20 6f 66 20 64 65 |.h inste|ad of de|
|00004730| 66 69 6e 69 6e 67 20 56 | 44 53 65 74 45 6e 74 72 |fining V|DSetEntr|
|00004740| 79 52 65 63 6f 72 64 20 | 61 6e 64 20 56 44 50 61 |yRecord |and VDPa|
|00004750| 67 65 49 6e 66 6f 2e 0d | 33 2f 32 30 2f 39 30 09 |geInfo..|3/20/90.|
|00004760| 09 64 67 70 09 6d 61 64 | 65 20 63 6f 6d 70 61 74 |.dgp.mad|e compat|
|00004770| 69 62 6c 65 20 77 69 74 | 68 20 4d 50 57 20 43 2e |ible wit|h MPW C.|
|00004780| 0d 33 2f 32 33 2f 39 30 | 09 09 64 67 70 09 63 68 |.3/23/90|..dgp.ch|
|00004790| 61 6e 67 65 64 20 63 68 | 61 72 20 74 6f 20 75 6e |anged ch|ar to un|
|000047a0| 73 69 67 6e 65 64 20 63 | 68 61 72 20 69 6e 20 56 |signed c|har in V|
|000047b0| 44 44 65 66 4d 6f 64 65 | 52 65 63 0d 09 09 09 09 |DDefMode|Rec.....|
|000047c0| 61 6e 64 20 56 44 46 6c | 61 67 52 65 63 20 74 6f |and VDFl|agRec to|
|000047d0| 20 70 72 65 76 65 6e 74 | 20 75 6e 64 65 73 69 72 | prevent| undesir|
|000047e0| 61 62 6c 65 20 73 69 67 | 6e 20 65 78 74 65 6e 73 |able sig|n extens|
|000047f0| 69 6f 6e 2e 0d 34 2f 32 | 2f 39 30 09 09 64 67 70 |ion..4/2|/90..dgp|
|00004800| 09 44 65 6c 65 74 65 64 | 20 6d 6f 64 65 20 61 72 |.Deleted| mode ar|
|00004810| 67 75 6d 65 6e 74 20 66 | 72 6f 6d 20 47 44 47 72 |gument f|rom GDGr|
|00004820| 61 79 53 63 72 65 65 6e | 28 29 2e 0d 37 2f 32 38 |ayScreen|()..7/28|
|00004830| 2f 39 30 09 09 64 67 70 | 20 46 69 78 65 64 20 73 |/90..dgp| Fixed s|
|00004840| 74 61 63 6b 20 6f 76 65 | 72 66 6c 6f 77 20 69 6e |tack ove|rflow in|
|00004850| 20 47 44 47 72 61 79 53 | 63 72 65 65 6e 2c 20 62 | GDGrayS|creen, b|
|00004860| 79 20 64 65 63 6c 61 72 | 69 6e 67 20 53 79 73 45 |y declar|ing SysE|
|00004870| 6e 76 52 65 63 20 73 74 | 61 74 69 63 2e 0d 31 30 |nvRec st|atic..10|
|00004880| 2f 32 30 2f 39 30 09 64 | 67 70 09 41 70 70 6c 65 |/20/90.d|gp.Apple|
|00004890| 20 68 61 73 20 72 65 6e | 61 6d 65 64 20 74 68 65 | has ren|amed the|
|000048a0| 20 63 6f 6e 74 72 6f 6c | 20 61 6e 64 20 73 74 61 | control| and sta|
|000048b0| 74 75 73 20 63 61 6c 6c | 73 2c 20 73 6f 20 49 20 |tus call|s, so I |
|000048c0| 66 6f 6c 6c 6f 77 65 64 | 20 73 75 69 74 3a 0d 09 |followed| suit:..|
|000048d0| 09 09 09 a5 47 44 47 65 | 74 50 61 67 65 42 61 73 |....GDGe|tPageBas|
|000048e0| 65 20 72 65 70 6c 61 63 | 65 73 20 47 44 47 65 74 |e replac|es GDGet|
|000048f0| 42 61 73 65 41 64 64 72 | 0d 09 09 09 09 a5 47 44 |BaseAddr|......GD|
|00004900| 52 65 73 65 74 20 72 65 | 70 6c 61 63 65 73 20 47 |Reset re|places G|
|00004910| 44 49 6e 69 74 0d 09 09 | 09 09 a5 47 44 47 72 61 |DInit...|...GDGra|
|00004920| 79 50 61 67 65 20 72 65 | 70 6c 61 63 65 20 47 44 |yPage re|place GD|
|00004930| 47 72 61 79 53 63 72 65 | 65 6e 0d 09 09 09 09 a5 |GrayScre|en......|
|00004940| 47 44 47 65 74 50 61 67 | 65 43 6e 74 20 72 65 70 |GDGetPag|eCnt rep|
|00004950| 6c 61 63 65 73 20 47 44 | 47 65 74 50 61 67 65 73 |laces GD|GetPages|
|00004960| 0d 32 2f 31 32 2f 39 31 | 09 09 64 67 70 20 44 69 |.2/12/91|..dgp Di|
|00004970| 73 63 6f 76 65 72 65 64 | 20 74 68 61 74 20 74 68 |scovered| that th|
|00004980| 65 20 6f 6c 64 20 62 75 | 67 20 69 6e 20 47 44 47 |e old bu|g in GDG|
|00004990| 72 61 79 50 61 67 65 20 | 69 73 20 73 74 69 6c 6c |rayPage |is still|
|000049a0| 20 70 72 65 73 65 6e 74 | 20 69 6e 20 53 79 73 74 | present| in Syst|
|000049b0| 65 6d 0d 09 09 09 09 36 | 2e 30 35 2c 20 73 6f 20 |em.....6|.05, so |
|000049c0| 49 20 72 65 6d 6f 76 65 | 64 20 74 68 65 20 63 6f |I remove|d the co|
|000049d0| 6e 64 69 74 69 6f 6e 61 | 6c 20 61 72 6f 75 6e 64 |nditiona|l around|
|000049e0| 20 74 68 65 20 62 75 67 | 20 66 69 78 2e 20 54 65 | the bug| fix. Te|
|000049f0| 73 74 47 44 56 69 64 65 | 6f 0d 09 09 09 09 6e 6f |stGDVide|o.....no|
|00004a00| 77 20 77 6f 72 6b 73 20 | 77 69 74 68 3a 20 4d 61 |w works |with: Ma|
|00004a10| 63 20 49 49 20 56 69 64 | 65 6f 20 43 61 72 64 2c |c II Vid|eo Card,|
|00004a20| 20 4d 61 63 20 49 49 20 | 44 69 73 70 6c 61 79 20 | Mac II |Display |
|00004a30| 43 61 72 64 20 28 34 a5 | 38 29 2c 20 0d 09 09 09 |Card (4.|8), ....|
|00004a40| 09 4d 61 63 20 49 49 63 | 69 20 42 75 69 6c 74 2d |.Mac IIc|i Built-|
|00004a50| 69 6e 20 56 69 64 65 6f | 2c 20 54 72 75 65 56 69 |in Video|, TrueVi|
|00004a60| 73 69 6f 6e 20 4e 75 56 | 69 73 74 61 2c 20 4d 61 |sion NuV|ista, Ma|
|00004a70| 63 20 49 49 73 69 20 42 | 75 69 6c 74 2d 69 6e 20 |c IIsi B|uilt-in |
|00004a80| 56 69 64 65 6f 2e 0d 37 | 2f 32 32 2f 39 31 09 09 |Video..7|/22/91..|
|00004a90| 64 67 70 09 43 68 61 6e | 67 65 64 20 64 65 66 69 |dgp.Chan|ged defi|
|00004aa0| 6e 69 74 69 6f 6e 20 6f | 66 20 63 73 47 54 61 62 |nition o|f csGTab|
|00004ab0| 6c 65 20 66 72 6f 6d 20 | 47 61 6d 6d 61 54 62 6c |le from |GammaTbl|
|00004ac0| 50 74 72 20 74 6f 20 50 | 74 72 2c 20 0d 09 09 09 |Ptr to P|tr, ....|
|00004ad0| 09 74 6f 20 63 6f 6e 66 | 6f 72 6d 20 77 69 74 68 |.to conf|orm with|
|00004ae0| 20 4d 50 57 20 43 2e 0d | 38 2f 32 34 2f 39 31 09 | MPW C..|8/24/91.|
|00004af0| 09 64 67 70 09 4d 61 64 | 65 20 63 6f 6d 70 61 74 |.dgp.Mad|e compat|
|00004b00| 69 62 6c 65 20 77 69 74 | 68 20 54 48 49 4e 4b 20 |ible wit|h THINK |
|00004b10| 43 20 35 2e 30 2e 0d 31 | 30 2f 32 32 2f 39 31 09 |C 5.0..1|0/22/91.|
|00004b20| 64 67 70 09 57 69 74 68 | 20 68 65 6c 70 20 66 72 |dgp.With| help fr|
|00004b30| 6f 6d 20 42 61 72 74 20 | 46 61 72 65 6c 6c 2c 20 |om Bart |Farell, |
|00004b40| 63 6f 6e 76 65 72 74 65 | 64 20 61 6c 6c 20 66 75 |converte|d all fu|
|00004b50| 6e 63 74 69 6f 6e 73 20 | 68 65 61 64 65 72 73 20 |nctions |headers |
|00004b60| 74 6f 0d 09 09 09 09 53 | 74 61 6e 64 61 72 64 20 |to.....S|tandard |
|00004b70| 43 20 73 74 79 6c 65 2e | 0d 38 2f 32 36 2f 39 32 |C style.|.8/26/92|
|00004b80| 09 09 64 67 70 09 61 64 | 64 65 64 20 61 20 66 65 |..dgp.ad|ded a fe|
|00004b90| 77 20 6d 69 73 63 65 6c | 6c 61 6e 65 6f 75 73 20 |w miscel|laneous |
|00004ba0| 63 6f 6d 6d 65 6e 74 73 | 0d 09 09 09 09 49 6e 20 |comments|.....In |
|00004bb0| 61 6c 6c 20 72 6f 75 74 | 69 6e 65 73 2c 20 2a 62 |all rout|ines, *b|
|00004bc0| 61 73 65 41 64 64 72 50 | 74 72 20 69 73 20 6e 6f |aseAddrP|tr is no|
|00004bd0| 77 20 73 65 74 20 6f 6e | 6c 79 20 69 66 20 62 61 |w set on|ly if ba|
|00004be0| 73 65 41 64 64 72 50 74 | 72 20 69 73 20 6e 6f 74 |seAddrPt|r is not|
|00004bf0| 20 4e 55 4c 4c 2e 0d 31 | 30 2f 31 30 2f 39 32 09 | NULL..1|0/10/92.|
|00004c00| 64 67 70 09 41 64 64 65 | 64 20 47 44 52 65 73 74 |dgp.Adde|d GDRest|
|00004c10| 6f 72 65 44 65 76 69 63 | 65 43 6c 75 74 28 29 2e |oreDevic|eClut().|
|00004c20| 20 52 65 6d 6f 76 65 64 | 20 6f 62 73 6f 6c 65 74 | Removed| obsolet|
|00004c30| 65 20 73 75 70 70 6f 72 | 74 20 66 6f 72 20 54 48 |e suppor|t for TH|
|00004c40| 49 4e 4b 20 43 20 34 2e | 0d 31 31 2f 33 30 2f 39 |INK C 4.|.11/30/9|
|00004c50| 32 09 64 67 70 20 63 6f | 72 72 65 63 74 65 64 20 |2.dgp co|rrected |
|00004c60| 65 72 72 6f 72 20 69 6e | 20 63 6f 6d 6d 65 6e 74 |error in| comment|
|00004c70| 20 64 6f 63 75 6d 65 6e | 74 69 6e 67 20 76 61 6c | documen|ting val|
|00004c80| 75 65 73 20 6f 66 20 61 | 72 67 75 6d 65 6e 74 20 |ues of a|rgument |
|00004c90| 74 6f 20 47 44 53 65 74 | 47 72 61 79 28 29 2e 0d |to GDSet|Gray()..|
|00004ca0| 09 09 09 09 53 65 74 20 | 66 6c 61 67 20 74 6f 20 |....Set |flag to |
|00004cb0| 7a 65 72 6f 20 66 6f 72 | 20 63 6f 6c 6f 72 2c 31 |zero for| color,1|
|00004cc0| 20 66 6f 72 20 6c 75 6d | 69 6e 61 6e 63 65 2d 6d | for lum|inance-m|
|00004cd0| 61 70 70 65 64 20 67 72 | 61 79 2e 0d 31 32 2f 39 |apped gr|ay..12/9|
|00004ce0| 2f 39 32 09 09 64 67 70 | 09 45 6e 68 61 6e 63 65 |/92..dgp|.Enhance|
|00004cf0| 64 20 47 44 52 65 73 74 | 6f 72 65 44 65 76 69 63 |d GDRest|oreDevic|
|00004d00| 65 43 6c 75 74 28 29 2e | 20 50 61 73 73 69 6e 67 |eClut().| Passing|
|00004d10| 20 61 20 4e 55 4c 4c 20 | 61 72 67 75 6d 65 6e 74 | a NULL |argument|
|00004d20| 20 6e 6f 77 20 72 65 71 | 75 65 73 74 73 0d 09 09 | now req|uests...|
|00004d30| 09 09 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 74 6f |..applic|ation to|
|00004d40| 20 61 6c 6c 20 64 65 76 | 69 63 65 73 2e 20 49 20 | all dev|ices. I |
|00004d50| 6f 6e 6c 79 20 6a 75 73 | 74 20 6c 65 61 72 6e 65 |only jus|t learne|
|00004d60| 64 20 74 68 61 74 20 41 | 70 70 6c 65 27 73 0d 09 |d that A|pple's..|
|00004d70| 09 09 09 52 65 73 74 6f | 72 65 44 65 76 69 63 65 |...Resto|reDevice|
|00004d80| 43 6c 75 74 28 29 20 62 | 65 68 61 76 65 73 20 69 |Clut() b|ehaves i|
|00004d90| 6e 20 74 68 69 73 20 77 | 61 79 2e 0d 31 32 2f 31 |n this w|ay..12/1|
|00004da0| 35 2f 39 32 09 64 67 70 | 20 52 65 6e 61 6d 65 64 |5/92.dgp| Renamed|
|00004db0| 20 47 44 52 65 73 74 6f | 72 65 44 65 76 69 63 65 | GDResto|reDevice|
|00004dc0| 43 6c 75 74 20 74 6f 20 | 47 44 52 65 73 74 6f 72 |Clut to |GDRestor|
|00004dd0| 65 44 65 76 69 63 65 43 | 6c 75 74 20 74 6f 20 62 |eDeviceC|lut to b|
|00004de0| 65 20 63 6f 6e 73 69 73 | 74 65 6e 74 0d 09 09 09 |e consis|tent....|
|00004df0| 09 77 69 74 68 20 41 70 | 70 6c 65 27 73 20 63 61 |.with Ap|ple's ca|
|00004e00| 70 69 74 61 6c 69 7a 61 | 74 69 6f 6e 20 6f 66 20 |pitaliza|tion of |
|00004e10| 52 65 73 74 6f 72 65 44 | 65 76 69 63 65 43 6c 75 |RestoreD|eviceClu|
|00004e20| 74 2e 0d 31 32 2f 31 36 | 2f 39 32 09 64 67 70 20 |t..12/16|/92.dgp |
|00004e30| 55 70 64 61 74 65 64 20 | 63 6f 6d 6d 65 6e 74 73 |Updated |comments|
|00004e40| 20 74 6f 20 62 65 20 63 | 6f 6e 73 69 73 74 65 6e | to be c|onsisten|
|00004e50| 74 20 77 69 74 68 20 33 | 72 64 20 65 64 69 74 69 |t with 3|rd editi|
|00004e60| 6f 6e 20 6f 66 20 44 65 | 73 69 67 6e 69 6e 67 20 |on of De|signing |
|00004e70| 43 61 72 64 73 0d 09 09 | 09 09 61 6e 64 20 44 72 |Cards...|..and Dr|
|00004e80| 69 76 65 72 73 2e 20 a5 | 52 65 6e 61 6d 65 64 20 |ivers. .|Renamed |
|00004e90| 6d 79 47 44 48 61 6e 64 | 6c 65 20 74 6f 20 22 64 |myGDHand|le to "d|
|00004ea0| 65 76 69 63 65 22 2c 20 | 77 68 69 63 68 20 69 73 |evice", |which is|
|00004eb0| 20 65 61 73 69 65 72 20 | 74 6f 20 72 65 61 64 2e | easier |to read.|
|00004ec0| 0d 09 09 09 09 52 65 6e | 61 6d 65 64 20 47 44 4c |.....Ren|amed GDL|
|00004ed0| 69 6e 65 61 72 47 61 6d | 6d 61 20 74 6f 20 47 44 |inearGam|ma to GD|
|00004ee0| 55 6e 63 6f 72 72 65 63 | 74 65 64 47 61 6d 6d 61 |Uncorrec|tedGamma|
|00004ef0| 2c 20 61 6e 64 20 67 65 | 6e 65 72 61 6c 69 7a 65 |, and ge|neralize|
|00004f00| 64 20 69 74 0d 09 09 09 | 09 74 6f 20 77 6f 72 6b |d it....|.to work|
|00004f10| 20 77 69 74 68 20 61 6e | 79 20 73 69 7a 65 20 44 | with an|y size D|
|00004f20| 41 43 2e 20 46 6f 72 20 | 63 6f 6d 70 61 74 69 62 |AC. For |compatib|
|00004f30| 69 6c 69 74 79 20 77 69 | 74 68 20 6f 6c 64 20 70 |ility wi|th old p|
|00004f40| 72 6f 67 72 61 6d 73 0d | 09 09 09 09 56 69 64 65 |rograms.|....Vide|
|00004f50| 6f 54 6f 6f 6c 62 6f 78 | 2e 68 20 6e 6f 77 20 68 |oToolbox|.h now h|
|00004f60| 61 73 20 61 20 23 64 65 | 66 69 6e 65 20 73 74 61 |as a #de|fine sta|
|00004f70| 74 65 6d 65 6e 74 20 6d | 61 6b 69 6e 67 20 47 44 |tement m|aking GD|
|00004f80| 4c 69 6e 65 61 72 47 61 | 6d 6d 61 0d 09 09 09 09 |LinearGa|mma.....|
|00004f90| 61 6e 20 61 6c 69 61 73 | 20 66 6f 72 20 47 44 55 |an alias| for GDU|
|00004fa0| 6e 63 6f 72 72 65 63 74 | 65 64 47 61 6d 6d 61 2e |ncorrect|edGamma.|
|00004fb0| 0d 31 32 2f 33 30 2f 39 | 32 09 64 67 70 20 55 70 |.12/30/9|2.dgp Up|
|00004fc0| 64 61 74 65 64 20 73 6f | 6d 65 20 6f 66 20 74 68 |dated so|me of th|
|00004fd0| 65 20 63 6f 6d 6d 65 6e | 74 73 2e 20 45 6c 69 6d |e commen|ts. Elim|
|00004fe0| 69 6e 61 74 65 64 20 46 | 69 6c 65 73 2e 68 2e 0d |inated F|iles.h..|
|00004ff0| 31 32 2f 33 30 2f 39 32 | 09 64 67 70 20 55 73 65 |12/30/92|.dgp Use|
|00005000| 20 47 44 43 6c 75 74 53 | 69 7a 65 28 29 20 74 6f | GDClutS|ize() to|
|00005010| 20 64 65 74 65 72 6d 69 | 6e 65 20 63 6c 75 74 20 | determi|ne clut |
|00005020| 73 69 7a 65 2e 0d 31 2f | 34 2f 39 33 09 09 64 67 |size..1/|4/93..dg|
|00005030| 70 20 49 6e 20 47 44 43 | 6c 75 74 53 69 7a 65 2c |p In GDC|lutSize,|
|00005040| 20 63 68 65 63 6b 20 66 | 6f 72 20 66 69 78 65 64 | check f|or fixed|
|00005050| 54 79 70 65 2e 0d 31 2f | 35 2f 39 33 09 09 64 67 |Type..1/|5/93..dg|
|00005060| 70 20 49 6e 20 47 44 43 | 6c 75 74 53 69 7a 65 2c |p In GDC|lutSize,|
|00005070| 20 6f 6e 6c 79 20 73 65 | 74 20 6c 61 73 74 20 63 | only se|t last c|
|00005080| 6c 75 74 20 65 6e 74 72 | 79 2e 0d 09 09 09 09 41 |lut entr|y......A|
|00005090| 64 64 65 64 20 50 61 74 | 63 68 4d 61 63 49 49 63 |dded Pat|chMacIIc|
|000050a0| 69 56 69 64 65 6f 44 72 | 69 76 65 72 28 29 20 74 |iVideoDr|iver() t|
|000050b0| 6f 20 74 68 65 20 65 6e | 64 20 6f 66 20 74 68 69 |o the en|d of thi|
|000050c0| 73 20 66 69 6c 65 2c 20 | 61 6e 64 20 0d 09 09 09 |s file, |and ....|
|000050d0| 09 61 75 74 6f 6d 61 74 | 69 63 61 6c 6c 79 20 69 |.automat|ically i|
|000050e0| 6e 76 6f 6b 65 20 69 74 | 20 74 68 65 20 66 69 72 |nvoke it| the fir|
|000050f0| 73 74 20 74 69 6d 65 20 | 47 44 47 65 74 45 6e 74 |st time |GDGetEnt|
|00005100| 72 69 65 73 20 69 73 20 | 63 61 6c 6c 65 64 2e 0d |ries is |called..|
|00005110| 31 2f 36 2f 39 33 09 09 | 64 67 70 09 43 6c 65 61 |1/6/93..|dgp.Clea|
|00005120| 6e 65 64 20 75 70 20 47 | 44 43 6c 75 74 53 69 7a |ned up G|DClutSiz|
|00005130| 65 2e 20 49 74 20 6e 6f | 77 20 73 65 65 6d 73 20 |e. It no|w seems |
|00005140| 74 6f 20 77 6f 72 6b 20 | 63 6f 72 72 65 63 74 6c |to work |correctl|
|00005150| 79 20 69 6e 20 74 68 65 | 20 64 69 72 65 63 74 20 |y in the| direct |
|00005160| 6d 6f 64 65 73 2e 0d 31 | 2f 31 38 2f 39 33 09 64 |modes..1|/18/93.d|
|00005170| 67 70 09 53 70 72 75 63 | 65 64 20 75 70 20 74 68 |gp.Spruc|ed up th|
|00005180| 65 20 64 6f 63 75 6d 65 | 6e 74 61 74 69 6f 6e 2e |e docume|ntation.|
|00005190| 0d 09 09 09 a5 41 64 64 | 65 64 20 61 6c 6c 20 74 |.....Add|ed all t|
|000051a0| 68 65 20 63 6f 64 65 20 | 66 6f 72 6d 65 72 6c 79 |he code |formerly|
|000051b0| 20 69 6e 20 47 44 49 64 | 65 6e 74 69 66 79 2e 63 | in GDId|entify.c|
|000051c0| 2c 20 62 75 74 20 6f 6d | 69 74 74 65 64 20 74 68 |, but om|itted th|
|000051d0| 65 20 6f 62 73 6f 6c 65 | 74 65 20 0d 09 09 09 66 |e obsole|te ....f|
|000051e0| 75 6e 63 74 69 6f 6e 20 | 47 44 49 64 65 6e 74 69 |unction |GDIdenti|
|000051f0| 66 79 28 29 2c 20 77 68 | 69 63 68 20 73 69 6d 70 |fy(), wh|ich simp|
|00005200| 6c 79 20 70 72 69 6e 74 | 65 64 20 47 44 4e 61 6d |ly print|ed GDNam|
|00005210| 65 28 29 20 61 6e 64 20 | 47 44 56 65 72 73 69 6f |e() and |GDVersio|
|00005220| 6e 2e 0d 09 09 09 a5 45 | 6e 68 61 6e 63 65 64 20 |n......E|nhanced |
|00005230| 47 44 47 65 74 45 6e 74 | 72 69 65 73 28 29 20 74 |GDGetEnt|ries() t|
|00005240| 6f 20 61 76 6f 69 64 20 | 63 61 6c 6c 69 6e 67 20 |o avoid |calling |
|00005250| 64 72 69 76 65 72 73 20 | 74 68 61 74 20 61 72 65 |drivers |that are|
|00005260| 20 6b 6e 6f 77 6e 0d 09 | 09 09 74 6f 20 63 72 61 | known..|..to cra|
|00005270| 73 68 2c 20 72 65 74 75 | 72 6e 69 6e 67 20 61 20 |sh, retu|rning a |
|00005280| 73 74 61 74 75 73 45 72 | 72 20 69 6e 73 74 65 61 |statusEr|r instea|
|00005290| 64 2e 0d 09 09 09 a5 52 | 65 63 6f 64 65 64 20 50 |d......R|ecoded P|
|000052a0| 61 74 63 68 4d 61 63 49 | 49 63 69 56 69 64 65 6f |atchMacI|IciVideo|
|000052b0| 44 72 69 76 65 72 28 29 | 20 73 6f 20 61 73 20 6e |Driver()| so as n|
|000052c0| 6f 74 20 74 6f 20 63 61 | 6c 6c 20 47 65 74 53 63 |ot to ca|ll GetSc|
|000052d0| 72 65 65 6e 44 65 76 69 | 63 65 2e 63 2e 0d 32 2f |reenDevi|ce.c..2/|
|000052e0| 31 2f 39 33 09 64 67 70 | 09 46 69 78 65 64 20 65 |1/93.dgp|.Fixed e|
|000052f0| 6e 64 6c 65 73 73 20 6c | 6f 6f 70 20 69 6e 20 50 |ndless l|oop in P|
|00005300| 61 74 63 68 4d 61 63 49 | 49 63 69 56 69 64 65 6f |atchMacI|IciVideo|
|00005310| 44 72 69 76 65 72 2e 20 | 45 6e 68 61 6e 63 65 64 |Driver. |Enhanced|
|00005320| 20 74 6f 20 64 65 61 6c | 20 77 69 74 68 0d 09 09 | to deal| with...|
|00005330| 09 52 4f 4d 2d 62 61 73 | 65 64 20 64 72 69 76 65 |.ROM-bas|ed drive|
|00005340| 72 73 20 61 73 20 77 65 | 6c 6c 2e 0d 32 2f 35 2f |rs as we|ll..2/5/|
|00005350| 39 33 09 64 67 70 09 45 | 78 70 61 6e 64 65 64 20 |93.dgp.E|xpanded |
|00005360| 74 68 65 20 64 6f 63 75 | 6d 65 6e 74 61 74 69 6f |the docu|mentatio|
|00005370| 6e 20 6f 66 20 47 44 53 | 65 74 45 6e 74 72 69 65 |n of GDS|etEntrie|
|00005380| 73 20 61 62 6f 76 65 2c | 20 61 6e 64 20 73 75 70 |s above,| and sup|
|00005390| 70 6c 69 65 64 20 73 61 | 6d 70 6c 65 0d 09 09 09 |plied sa|mple....|
|000053a0| 63 6f 64 65 20 73 68 6f | 77 69 6e 67 20 68 6f 77 |code sho|wing how|
|000053b0| 20 74 6f 20 6c 6f 61 64 | 20 74 68 65 20 63 6c 75 | to load| the clu|
|000053c0| 74 2e 0d 32 2f 37 2f 39 | 33 09 64 67 70 20 46 69 |t..2/7/9|3.dgp Fi|
|000053d0| 78 65 64 20 65 6e 64 6c | 65 73 73 20 6c 6f 6f 70 |xed endl|ess loop|
|000053e0| 20 69 6e 20 50 61 74 63 | 68 4d 61 63 49 49 63 69 | in Patc|hMacIIci|
|000053f0| 56 69 64 65 6f 44 72 69 | 76 65 72 2e 0d 32 2f 32 |VideoDri|ver..2/2|
|00005400| 30 2f 39 33 09 64 67 70 | 09 46 69 78 65 64 20 62 |0/93.dgp|.Fixed b|
|00005410| 75 67 20 69 6e 20 47 44 | 55 6e 63 6f 72 72 65 63 |ug in GD|Uncorrec|
|00005420| 74 65 64 47 61 6d 6d 61 | 28 29 20 74 68 61 74 20 |tedGamma|() that |
|00005430| 77 61 73 20 63 61 75 73 | 69 6e 67 20 54 65 73 74 |was caus|ing Test|
|00005440| 43 6c 75 74 73 20 74 6f | 20 66 61 69 6c 0d 09 09 |Cluts to| fail...|
|00005450| 09 66 6f 72 20 76 69 64 | 65 6f 20 64 65 76 69 63 |.for vid|eo devic|
|00005460| 65 73 20 74 68 61 74 20 | 68 61 76 65 20 6e 6f 6e |es that |have non|
|00005470| 73 74 61 6e 64 61 72 64 | 20 67 61 6d 6d 61 20 74 |standard| gamma t|
|00005480| 61 62 6c 65 73 2e 20 0d | 33 2f 31 38 2f 39 33 09 |ables. .|3/18/93.|
|00005490| 64 67 70 09 46 69 78 65 | 64 20 64 69 76 69 64 65 |dgp.Fixe|d divide|
|000054a0| 20 62 79 20 7a 65 72 6f | 20 65 72 72 6f 72 20 69 | by zero| error i|
|000054b0| 6e 20 47 44 43 6c 75 74 | 53 69 7a 65 2e 0d 34 2f |n GDClut|Size..4/|
|000054c0| 36 2f 39 33 09 64 67 70 | 09 47 44 47 65 74 50 61 |6/93.dgp|.GDGetPa|
|000054d0| 67 65 43 6e 74 28 29 20 | 6e 6f 77 20 73 65 74 73 |geCnt() |now sets|
|000054e0| 20 2a 70 61 67 65 50 74 | 72 20 61 72 67 75 6d 65 | *pagePt|r argume|
|000054f0| 6e 74 20 6f 6e 6c 79 20 | 69 66 20 6e 6f 20 65 72 |nt only |if no er|
|00005500| 72 6f 72 20 6f 63 63 75 | 72 73 2e 0d 09 09 09 44 |ror occu|rs.....D|
|00005510| 65 6c 65 74 65 64 20 47 | 44 4d 6f 64 65 4e 61 6d |eleted G|DModeNam|
|00005520| 65 28 29 2e 20 52 65 6d | 6f 76 65 64 20 61 73 73 |e(). Rem|oved ass|
|00005530| 75 6d 70 74 69 6f 6e 2c | 20 69 6e 20 61 6c 6c 20 |umption,| in all |
|00005540| 72 6f 75 74 69 6e 65 73 | 2c 20 74 68 61 74 20 74 |routines|, that t|
|00005550| 68 65 72 65 0d 09 09 09 | 69 73 20 61 6e 79 20 70 |here....|is any p|
|00005560| 61 72 74 69 63 75 6c 61 | 72 20 63 6f 72 72 65 73 |articula|r corres|
|00005570| 70 6f 6e 64 65 6e 63 65 | 20 62 65 74 77 65 65 6e |pondence| between|
|00005580| 20 74 68 65 20 76 69 64 | 65 6f 20 6d 6f 64 65 20 | the vid|eo mode |
|00005590| 6e 75 6d 62 65 72 20 61 | 6e 64 0d 09 09 09 74 68 |number a|nd....th|
|000055a0| 65 20 70 69 78 65 6c 20 | 73 69 7a 65 2e 20 41 64 |e pixel |size. Ad|
|000055b0| 64 65 64 20 74 77 6f 20 | 6e 65 77 20 72 6f 75 74 |ded two |new rout|
|000055c0| 69 6e 65 73 2c 20 47 44 | 50 69 78 65 6c 53 69 7a |ines, GD|PixelSiz|
|000055d0| 65 20 61 6e 64 20 47 44 | 54 79 70 65 2c 0d 09 09 |e and GD|Type,...|
|000055e0| 09 74 68 61 74 20 72 65 | 74 75 72 6e 20 74 68 65 |.that re|turn the|
|000055f0| 20 70 69 78 65 6c 53 69 | 7a 65 20 61 6e 64 20 67 | pixelSi|ze and g|
|00005600| 64 54 79 70 65 20 28 69 | 2e 65 2e 20 66 69 78 65 |dType (i|.e. fixe|
|00005610| 64 54 79 70 65 2c 20 63 | 6c 75 74 54 79 70 65 2c |dType, c|lutType,|
|00005620| 20 6f 72 20 0d 09 09 09 | 64 69 72 65 63 74 54 79 | or ....|directTy|
|00005630| 70 65 29 20 6f 66 20 74 | 68 65 20 64 65 76 69 63 |pe) of t|he devic|
|00005640| 65 2e 20 43 6f 6d 70 6c | 65 74 65 6c 79 20 72 65 |e. Compl|etely re|
|00005650| 77 72 6f 74 65 20 47 44 | 43 6c 75 74 53 69 7a 65 |wrote GD|ClutSize|
|00005660| 2e 0d 34 2f 31 36 2f 39 | 33 09 64 67 70 09 53 74 |..4/16/9|3.dgp.St|
|00005670| 72 65 61 6d 6c 69 6e 65 | 64 20 47 44 43 6c 75 74 |reamline|d GDClut|
|00005680| 53 69 7a 65 28 29 20 74 | 6f 20 6d 61 6b 65 20 69 |Size() t|o make i|
|00005690| 74 20 66 61 73 74 20 65 | 6e 6f 75 67 68 20 66 6f |t fast e|nough fo|
|000056a0| 72 20 72 6f 75 74 69 6e | 65 20 75 73 65 2e 0d 34 |r routin|e use..4|
|000056b0| 2f 31 39 2f 39 33 09 64 | 67 70 09 41 64 64 65 64 |/19/93.d|gp.Added|
|000056c0| 20 47 44 4e 65 77 4c 69 | 6e 65 61 72 43 6f 6c 6f | GDNewLi|nearColo|
|000056d0| 72 54 61 62 6c 65 2e 0d | 34 2f 32 35 2f 39 33 09 |rTable..|4/25/93.|
|000056e0| 64 67 70 09 4d 61 64 65 | 20 43 6e 74 72 6c 50 61 |dgp.Made| CntrlPa|
|000056f0| 72 61 6d 20 61 75 74 6f | 6d 61 74 69 63 20 69 6e |ram auto|matic in|
|00005700| 73 74 65 61 64 20 6f 66 | 20 73 74 61 74 69 63 2e |stead of| static.|
|00005710| 0d 34 2f 32 35 2f 39 33 | 09 64 67 70 09 41 64 64 |.4/25/93|.dgp.Add|
|00005720| 65 64 20 47 44 43 6f 6c | 6f 72 73 28 64 65 76 69 |ed GDCol|ors(devi|
|00005730| 63 65 29 20 61 6e 64 20 | 47 44 50 72 69 6e 74 47 |ce) and |GDPrintG|
|00005740| 61 6d 6d 61 54 61 62 6c | 65 28 29 2e 20 41 6c 70 |ammaTabl|e(). Alp|
|00005750| 68 61 62 65 74 69 7a 65 | 64 20 74 68 65 20 6c 69 |habetize|d the li|
|00005760| 73 74 73 0d 09 09 09 6f | 66 20 66 75 6e 63 74 69 |sts....o|f functi|
|00005770| 6f 6e 73 20 69 6e 20 74 | 68 65 20 64 6f 63 75 6d |ons in t|he docum|
|00005780| 65 6e 74 61 74 69 6f 6e | 20 61 62 6f 76 65 2e 0d |entation| above..|
|00005790| 35 2f 31 31 2f 39 33 09 | 64 67 70 09 43 68 61 6e |5/11/93.|dgp.Chan|
|000057a0| 67 65 64 20 47 44 50 72 | 69 6e 74 47 61 6d 6d 61 |ged GDPr|intGamma|
|000057b0| 54 61 62 6c 65 28 29 20 | 74 6f 20 61 63 63 65 70 |Table() |to accep|
|000057c0| 74 20 61 20 73 69 6d 70 | 6c 65 20 66 69 6c 65 20 |t a simp|le file |
|000057d0| 70 6f 69 6e 74 65 72 20 | 69 6e 73 74 65 61 64 20 |pointer |instead |
|000057e0| 6f 66 0d 09 09 09 61 6e | 20 61 72 72 61 79 20 6f |of....an| array o|
|000057f0| 66 20 74 77 6f 20 66 69 | 6c 65 20 70 6f 69 6e 74 |f two fi|le point|
|00005800| 65 72 73 2e 0d 37 2f 37 | 2f 39 33 09 64 67 70 20 |ers..7/7|/93.dgp |
|00005810| 65 6e 68 61 6e 63 65 64 | 20 47 44 44 61 63 53 69 |enhanced| GDDacSi|
|00005820| 7a 65 28 29 20 74 6f 20 | 72 65 74 75 72 6e 20 38 |ze() to |return 8|
|00005830| 20 75 6e 6c 65 73 73 20 | 74 68 65 20 67 61 6d 6d | unless |the gamm|
|00005840| 61 20 74 61 62 6c 65 20 | 69 73 20 70 72 65 73 65 |a table |is prese|
|00005850| 6e 74 20 61 6e 64 0d 09 | 09 09 72 65 61 73 6f 6e |nt and..|..reason|
|00005860| 61 62 6c 65 2e 0d 37 2f | 32 39 2f 39 34 09 64 67 |able..7/|29/94.dg|
|00005870| 70 09 61 64 64 65 64 20 | 47 44 4e 61 6d 65 53 74 |p.added |GDNameSt|
|00005880| 72 28 29 2e 0d 39 2f 35 | 2f 39 34 20 64 67 70 20 |r()..9/5|/94 dgp |
|00005890| 72 65 6d 6f 76 65 64 20 | 61 73 73 75 6d 70 74 69 |removed |assumpti|
|000058a0| 6f 6e 20 69 6e 20 70 72 | 69 6e 74 66 27 73 20 74 |on in pr|intf's t|
|000058b0| 68 61 74 20 69 6e 74 3d | 3d 73 68 6f 72 74 2e 0d |hat int=|=short..|
|000058c0| 31 30 2f 32 35 2f 39 34 | 20 64 67 70 20 63 68 65 |10/25/94| dgp che|
|000058d0| 63 6b 20 66 6f 72 20 6d | 69 73 73 69 6e 67 20 64 |ck for m|issing d|
|000058e0| 72 69 76 65 72 2c 20 28 | 2a 64 65 76 69 63 65 29 |river, (|*device)|
|000058f0| 2d 3e 67 64 52 65 66 4e | 75 6d 3d 3d 30 2c 20 61 |->gdRefN|um==0, a|
|00005900| 6e 64 20 74 72 65 61 74 | 20 74 68 61 74 20 63 61 |nd treat| that ca|
|00005910| 73 65 0d 09 09 09 6a 75 | 73 74 20 6c 69 6b 65 20 |se....ju|st like |
|00005920| 20 64 65 76 69 63 65 3d | 3d 4e 55 4c 4c 2e 20 44 | device=|=NULL. D|
|00005930| 65 76 69 63 65 73 20 63 | 72 65 61 74 65 64 20 62 |evices c|reated b|
|00005940| 79 20 4e 65 77 47 57 6f | 72 6c 64 20 68 61 76 65 |y NewGWo|rld have|
|00005950| 20 6e 6f 20 64 72 69 76 | 65 72 2e 0d 31 32 2f 32 | no driv|er..12/2|
|00005960| 39 2f 39 34 20 64 67 70 | 20 61 64 64 65 64 20 47 |9/94 dgp| added G|
|00005970| 44 47 65 74 44 69 73 70 | 6c 61 79 4d 6f 64 65 28 |DGetDisp|layMode(|
|00005980| 29 2c 20 63 61 6c 6c 73 | 20 63 73 63 47 65 74 43 |), calls| cscGetC|
|00005990| 75 72 4d 6f 64 65 2c 20 | 62 61 73 65 64 20 6f 6e |urMode, |based on|
|000059a0| 20 41 70 70 6c 65 27 73 | 20 6e 65 77 0d 09 09 09 | Apple's| new....|
|000059b0| 44 69 73 70 6c 61 79 20 | 44 65 76 69 63 65 20 44 |Display |Device D|
|000059c0| 72 69 76 65 72 20 47 75 | 69 64 65 20 44 65 76 65 |river Gu|ide Deve|
|000059d0| 6c 6f 70 65 72 20 4e 6f | 74 65 20 6f 6e 20 74 68 |loper No|te on th|
|000059e0| 65 20 4a 61 6e 75 61 72 | 79 20 27 39 34 20 44 65 |e Januar|y '94 De|
|000059f0| 76 65 6c 6f 70 65 72 20 | 43 44 2e 0d 31 2f 31 35 |veloper |CD..1/15|
|00005a00| 2f 39 34 20 64 67 70 20 | 47 44 50 69 78 65 6c 53 |/94 dgp |GDPixelS|
|00005a10| 69 7a 65 20 69 66 20 73 | 75 70 70 6c 69 65 64 20 |ize if s|upplied |
|00005a20| 77 69 74 68 20 61 20 6d | 65 72 65 6c 79 20 64 65 |with a m|erely de|
|00005a30| 76 69 63 65 20 72 65 63 | 6f 72 64 2c 20 77 69 74 |vice rec|ord, wit|
|00005a40| 68 20 6e 6f 20 61 73 73 | 6f 63 69 61 74 65 64 20 |h no ass|ociated |
|00005a50| 0d 09 09 09 64 65 76 69 | 63 65 20 64 72 69 76 65 |....devi|ce drive|
|00005a60| 72 2c 20 74 68 65 6e 20 | 77 65 20 6a 75 73 74 20 |r, then |we just |
|00005a70| 72 65 74 75 72 6e 20 28 | 2a 2a 28 2a 2a 64 65 76 |return (|**(**dev|
|00005a80| 69 63 65 29 2e 67 64 50 | 4d 61 70 29 2e 70 69 78 |ice).gdP|Map).pix|
|00005a90| 65 6c 53 69 7a 65 0d 33 | 2f 32 32 2f 39 35 20 64 |elSize.3|/22/95 d|
|00005aa0| 67 70 20 41 64 64 65 64 | 20 2e 44 69 73 70 6c 61 |gp Added| .Displa|
|00005ab0| 79 5f 56 69 64 65 6f 5f | 41 70 70 6c 65 5f 44 4f |y_Video_|Apple_DO|
|00005ac0| 4d 45 4d 61 78 20 74 6f | 20 74 68 65 20 6c 69 73 |MEMax to| the lis|
|00005ad0| 74 20 6f 66 20 64 72 69 | 76 65 72 73 20 74 68 61 |t of dri|vers tha|
|00005ae0| 74 20 64 6f 6e 27 74 0d | 09 09 09 73 75 70 70 6f |t don't.|...suppo|
|00005af0| 72 74 20 63 73 63 47 65 | 74 45 6e 74 72 69 65 73 |rt cscGe|tEntries|
|00005b00| 2e 20 43 72 61 73 68 20 | 72 65 70 6f 72 74 65 64 |. Crash |reported|
|00005b10| 20 62 79 20 47 72 65 67 | 20 4a 61 63 6b 73 6f 6e | by Greg| Jackson|
|00005b20| 2e 0d 34 2f 36 2f 39 35 | 20 64 67 70 20 43 68 61 |..4/6/95| dgp Cha|
|00005b30| 6e 67 65 64 20 47 44 55 | 6e 63 6f 72 72 65 63 74 |nged GDU|ncorrect|
|00005b40| 65 64 47 61 6d 6d 61 28 | 29 20 74 6f 20 70 61 73 |edGamma(|) to pas|
|00005b50| 73 20 61 20 4e 55 4c 4c | 20 67 61 6d 6d 61 20 74 |s a NULL| gamma t|
|00005b60| 61 62 6c 65 20 70 6f 69 | 6e 74 65 72 20 69 6e 73 |able poi|nter ins|
|00005b70| 74 65 61 64 20 6f 66 0d | 09 09 09 61 20 6c 69 6e |tead of.|...a lin|
|00005b80| 65 61 72 20 67 61 6d 6d | 61 20 74 61 62 6c 65 2c |ear gamm|a table,|
|00005b90| 20 69 6e 20 74 68 65 20 | 68 6f 70 65 73 20 74 68 | in the |hopes th|
|00005ba0| 61 74 20 74 68 69 73 20 | 6d 69 67 68 74 20 77 6f |at this |might wo|
|00005bb0| 72 6b 20 65 76 65 6e 20 | 77 69 74 68 20 74 68 65 |rk even |with the|
|00005bc0| 0d 09 09 09 66 65 77 20 | 76 69 64 65 6f 20 64 72 |....few |video dr|
|00005bd0| 69 76 65 72 73 20 74 68 | 61 74 20 64 6f 6e 27 74 |ivers th|at don't|
|00005be0| 20 66 75 6c 6c 79 20 73 | 75 70 70 6f 72 74 20 63 | fully s|upport c|
|00005bf0| 73 63 53 65 74 47 61 6d | 6d 61 2e 0d 2a 2f 0d 0d |scSetGam|ma..*/..|
|00005c00| 23 69 6e 63 6c 75 64 65 | 20 22 56 69 64 65 6f 54 |#include| "VideoT|
|00005c10| 6f 6f 6c 62 6f 78 2e 68 | 22 0d 23 69 6e 63 6c 75 |oolbox.h|".#inclu|
|00005c20| 64 65 20 3c 61 73 73 65 | 72 74 2e 68 3e 0d 23 69 |de <asse|rt.h>.#i|
|00005c30| 6e 63 6c 75 64 65 20 3c | 52 4f 4d 44 65 66 73 2e |nclude <|ROMDefs.|
|00005c40| 68 3e 0d 2f 2f 23 69 6e | 63 6c 75 64 65 20 3c 44 |h>.//#in|clude <D|
|00005c50| 69 73 70 6c 61 79 73 2e | 68 3e 0d 23 64 65 66 69 |isplays.|h>.#defi|
|00005c60| 6e 65 20 64 52 41 4d 42 | 61 73 65 64 20 30 78 30 |ne dRAMB|ased 0x0|
|00005c70| 30 34 30 0d 0d 23 69 66 | 20 21 55 4e 49 56 45 52 |040..#if| !UNIVER|
|00005c80| 53 41 4c 5f 48 45 41 44 | 45 52 53 0d 09 2f 2a 20 |SAL_HEAD|ERS../* |
|00005c90| 74 68 65 73 65 20 64 65 | 63 6c 61 72 61 74 69 6f |these de|claratio|
|00005ca0| 6e 73 20 61 70 70 65 61 | 72 20 69 6e 20 74 68 65 |ns appea|r in the|
|00005cb0| 20 6c 61 74 65 73 74 20 | 56 69 64 65 6f 2e 68 20 | latest |Video.h |
|00005cc0| 2a 2f 0d 09 73 74 72 75 | 63 74 20 56 44 53 77 69 |*/..stru|ct VDSwi|
|00005cd0| 74 63 68 49 6e 66 6f 52 | 65 63 7b 0d 09 09 75 6e |tchInfoR|ec{...un|
|00005ce0| 73 69 67 6e 65 64 20 73 | 68 6f 72 74 20 63 73 4d |signed s|hort csM|
|00005cf0| 6f 64 65 3b 0d 09 09 75 | 6e 73 69 67 6e 65 64 20 |ode;...u|nsigned |
|00005d00| 6c 6f 6e 67 20 63 73 44 | 61 74 61 3b 0d 09 09 75 |long csD|ata;...u|
|00005d10| 6e 73 69 67 6e 65 64 20 | 73 68 6f 72 74 20 63 73 |nsigned |short cs|
|00005d20| 50 61 67 65 3b 0d 09 09 | 50 74 72 20 63 73 42 61 |Page;...|Ptr csBa|
|00005d30| 73 65 41 64 64 72 3b 0d | 09 09 75 6e 73 69 67 6e |seAddr;.|..unsign|
|00005d40| 65 64 20 6c 6f 6e 67 20 | 63 73 52 65 73 65 72 76 |ed long |csReserv|
|00005d50| 65 64 3b 0d 09 7d 3b 0d | 09 74 79 70 65 64 65 66 |ed;..};.|.typedef|
|00005d60| 20 73 74 72 75 63 74 20 | 56 44 53 77 69 74 63 68 | struct |VDSwitch|
|00005d70| 49 6e 66 6f 52 65 63 20 | 56 44 53 77 69 74 63 68 |InfoRec |VDSwitch|
|00005d80| 49 6e 66 6f 52 65 63 3b | 0d 09 65 6e 75 6d 7b 63 |InfoRec;|..enum{c|
|00005d90| 73 63 47 65 74 43 75 72 | 4d 6f 64 65 3d 31 30 7d |scGetCur|Mode=10}|
|00005da0| 3b 0d 09 65 6e 75 6d 7b | 63 73 63 47 65 74 4e 65 |;..enum{|cscGetNe|
|00005db0| 78 74 52 65 73 6f 6c 75 | 74 69 6f 6e 3d 31 37 7d |xtResolu|tion=17}|
|00005dc0| 3b 0d 09 74 79 70 65 64 | 65 66 20 75 6e 73 69 67 |;..typed|ef unsig|
|00005dd0| 6e 65 64 20 6c 6f 6e 67 | 20 44 69 73 70 6c 61 79 |ned long| Display|
|00005de0| 4d 6f 64 65 49 44 3b 0d | 09 74 79 70 65 64 65 66 |ModeID;.|.typedef|
|00005df0| 20 75 6e 73 69 67 6e 65 | 64 20 73 68 6f 72 74 20 | unsigne|d short |
|00005e00| 44 65 70 74 68 4d 6f 64 | 65 3b 0d 09 73 74 72 75 |DepthMod|e;..stru|
|00005e10| 63 74 20 56 44 52 65 73 | 6f 6c 75 74 69 6f 6e 49 |ct VDRes|olutionI|
|00005e20| 6e 66 6f 52 65 63 20 7b | 0d 09 09 44 69 73 70 6c |nfoRec {|...Displ|
|00005e30| 61 79 4d 6f 64 65 49 44 | 09 09 09 09 09 63 73 50 |ayModeID|.....csP|
|00005e40| 72 65 76 69 6f 75 73 44 | 69 73 70 6c 61 79 4d 6f |reviousD|isplayMo|
|00005e50| 64 65 49 44 3b 09 2f 2a | 20 49 44 20 6f 66 20 74 |deID;./*| ID of t|
|00005e60| 68 65 20 70 72 65 76 69 | 6f 75 73 20 72 65 73 6f |he previ|ous reso|
|00005e70| 6c 75 74 69 6f 6e 20 69 | 6e 20 61 20 63 68 61 69 |lution i|n a chai|
|00005e80| 6e 20 2a 2f 0d 09 09 44 | 69 73 70 6c 61 79 4d 6f |n */...D|isplayMo|
|00005e90| 64 65 49 44 09 09 09 09 | 09 63 73 44 69 73 70 6c |deID....|.csDispl|
|00005ea0| 61 79 4d 6f 64 65 49 44 | 3b 09 09 09 2f 2a 20 49 |ayModeID|;.../* I|
|00005eb0| 44 20 6f 66 20 74 68 65 | 20 6e 65 78 74 20 72 65 |D of the| next re|
|00005ec0| 73 6f 6c 75 74 69 6f 6e | 20 2a 2f 0d 09 09 75 6e |solution| */...un|
|00005ed0| 73 69 67 6e 65 64 20 6c | 6f 6e 67 09 09 09 09 09 |signed l|ong.....|
|00005ee0| 63 73 48 6f 72 69 7a 6f | 6e 74 61 6c 50 69 78 65 |csHorizo|ntalPixe|
|00005ef0| 6c 73 3b 09 09 09 2f 2a | 20 23 20 6f 66 20 70 69 |ls;.../*| # of pi|
|00005f00| 78 65 6c 73 20 69 6e 20 | 61 20 68 6f 72 69 7a 6f |xels in |a horizo|
|00005f10| 6e 74 61 6c 20 6c 69 6e | 65 20 2a 2f 0d 09 09 75 |ntal lin|e */...u|
|00005f20| 6e 73 69 67 6e 65 64 20 | 6c 6f 6e 67 09 09 09 09 |nsigned |long....|
|00005f30| 09 63 73 56 65 72 74 69 | 63 61 6c 4c 69 6e 65 73 |.csVerti|calLines|
|00005f40| 3b 09 09 09 2f 2a 20 23 | 20 6f 66 20 6c 69 6e 65 |;.../* #| of line|
|00005f50| 73 20 69 6e 20 61 20 73 | 63 72 65 65 6e 20 2a 2f |s in a s|creen */|
|00005f60| 0d 09 09 46 69 78 65 64 | 09 09 09 09 09 09 09 63 |...Fixed|.......c|
|00005f70| 73 52 65 66 72 65 73 68 | 52 61 74 65 3b 09 09 09 |sRefresh|Rate;...|
|00005f80| 09 2f 2a 20 56 65 72 74 | 69 63 61 6c 20 52 65 66 |./* Vert|ical Ref|
|00005f90| 72 65 73 68 20 52 61 74 | 65 20 69 6e 20 48 7a 20 |resh Rat|e in Hz |
|00005fa0| 2a 2f 0d 09 09 44 65 70 | 74 68 4d 6f 64 65 09 09 |*/...Dep|thMode..|
|00005fb0| 09 09 09 09 63 73 4d 61 | 78 44 65 70 74 68 4d 6f |....csMa|xDepthMo|
|00005fc0| 64 65 3b 09 09 09 09 2f | 2a 20 30 78 38 30 2d 62 |de;..../|* 0x80-b|
|00005fd0| 61 73 65 64 20 6e 75 6d | 62 65 72 20 72 65 70 72 |ased num|ber repr|
|00005fe0| 65 73 65 6e 74 69 6e 67 | 20 6d 61 78 20 62 69 74 |esenting| max bit|
|00005ff0| 20 64 65 70 74 68 20 2a | 2f 0d 09 09 75 6e 73 69 | depth *|/...unsi|
|00006000| 67 6e 65 64 20 6c 6f 6e | 67 09 09 09 09 09 63 73 |gned lon|g.....cs|
|00006010| 52 65 73 65 72 76 65 64 | 3b 09 09 09 09 09 2f 2a |Reserved|;...../*|
|00006020| 20 52 65 73 65 72 76 65 | 64 20 2a 2f 0d 09 09 75 | Reserve|d */...u|
|00006030| 6e 73 69 67 6e 65 64 20 | 6c 6f 6e 67 09 09 09 09 |nsigned |long....|
|00006040| 09 63 73 52 65 73 65 72 | 76 65 64 31 3b 09 09 09 |.csReser|ved1;...|
|00006050| 09 2f 2a 20 52 65 73 65 | 72 76 65 64 20 2a 2f 0d |./* Rese|rved */.|
|00006060| 09 7d 3b 0d 09 74 79 70 | 65 64 65 66 20 73 74 72 |.};..typ|edef str|
|00006070| 75 63 74 20 56 44 52 65 | 73 6f 6c 75 74 69 6f 6e |uct VDRe|solution|
|00006080| 49 6e 66 6f 52 65 63 20 | 56 44 52 65 73 6f 6c 75 |InfoRec |VDResolu|
|00006090| 74 69 6f 6e 49 6e 66 6f | 52 65 63 3b 0d 09 74 79 |tionInfo|Rec;..ty|
|000060a0| 70 65 64 65 66 20 56 44 | 52 65 73 6f 6c 75 74 69 |pedef VD|Resoluti|
|000060b0| 6f 6e 49 6e 66 6f 52 65 | 63 20 2a 56 44 52 65 73 |onInfoRe|c *VDRes|
|000060c0| 6f 6c 75 74 69 6f 6e 49 | 6e 66 6f 50 74 72 3b 0d |olutionI|nfoPtr;.|
|000060d0| 23 65 6e 64 69 66 0d 0d | 74 79 70 65 64 65 66 20 |#endif..|typedef |
|000060e0| 73 74 72 75 63 74 20 56 | 44 46 6c 61 67 52 65 63 |struct V|DFlagRec|
|000060f0| 20 7b 0d 09 75 6e 73 69 | 67 6e 65 64 20 63 68 61 | {..unsi|gned cha|
|00006100| 72 20 66 6c 61 67 3b 0d | 09 63 68 61 72 20 70 61 |r flag;.|.char pa|
|00006110| 64 3b 0d 7d 20 56 44 46 | 6c 61 67 52 65 63 3b 0d |d;.} VDF|lagRec;.|
|00006120| 0d 74 79 70 65 64 65 66 | 20 73 74 72 75 63 74 20 |.typedef| struct |
|00006130| 56 44 44 65 66 4d 6f 64 | 65 52 65 63 7b 0d 09 75 |VDDefMod|eRec{..u|
|00006140| 6e 73 69 67 6e 65 64 20 | 63 68 61 72 20 73 70 49 |nsigned |char spI|
|00006150| 44 3b 0d 09 63 68 61 72 | 20 70 61 64 3b 0d 7d 20 |D;..char| pad;.} |
|00006160| 56 44 44 65 66 4d 6f 64 | 65 52 65 63 3b 0d 0d 74 |VDDefMod|eRec;..t|
|00006170| 79 70 65 64 65 66 20 73 | 74 72 75 63 74 20 7b 0d |ypedef s|truct {.|
|00006180| 09 73 68 6f 72 74 20 66 | 6c 61 67 73 3b 0d 09 73 |.short f|lags;..s|
|00006190| 68 6f 72 74 20 62 6c 61 | 6e 6b 73 5b 33 5d 3b 0d |hort bla|nks[3];.|
|000061a0| 09 73 68 6f 72 74 20 6f | 70 65 6e 3b 0d 09 73 68 |.short o|pen;..sh|
|000061b0| 6f 72 74 20 70 72 69 6d | 65 3b 0d 09 73 68 6f 72 |ort prim|e;..shor|
|000061c0| 74 20 63 6f 6e 74 72 6f | 6c 3b 0d 09 73 68 6f 72 |t contro|l;..shor|
|000061d0| 74 20 73 74 61 74 75 73 | 3b 0d 09 73 68 6f 72 74 |t status|;..short|
|000061e0| 20 63 6c 6f 73 65 3b 0d | 09 53 74 72 32 35 35 20 | close;.|.Str255 |
|000061f0| 6e 61 6d 65 3b 0d 7d 20 | 56 69 64 65 6f 44 72 69 |name;.} |VideoDri|
|00006200| 76 65 72 3b 0d 56 69 64 | 65 6f 44 72 69 76 65 72 |ver;.Vid|eoDriver|
|00006210| 20 2a 47 44 44 72 69 76 | 65 72 41 64 64 72 65 73 | *GDDriv|erAddres|
|00006220| 73 28 47 44 48 61 6e 64 | 6c 65 20 64 65 76 69 63 |s(GDHand|le devic|
|00006230| 65 29 3b 0d 0d 74 79 70 | 65 64 65 66 20 73 74 72 |e);..typ|edef str|
|00006240| 75 63 74 20 7b 0d 09 73 | 68 6f 72 74 20 63 73 43 |uct {..s|hort csC|
|00006250| 6f 64 65 3b 09 09 2f 2f | 20 63 6f 6e 74 72 6f 6c |ode;..//| control|
|00006260| 20 63 6f 64 65 0d 09 73 | 68 6f 72 74 20 6c 65 6e | code..s|hort len|
|00006270| 67 74 68 3b 09 09 2f 2f | 20 74 6f 74 61 6c 20 70 |gth;..//| total p|
|00006280| 61 72 61 6d 65 74 65 72 | 20 62 6c 6f 63 6b 20 62 |arameter| block b|
|00006290| 79 74 65 73 0d 09 63 68 | 61 72 20 70 61 72 61 6d |ytes..ch|ar param|
|000062a0| 5b 5d 3b 09 09 2f 2f 20 | 63 6f 6e 74 72 6f 6c 20 |[];..// |control |
|000062b0| 63 61 6c 6c 20 64 61 74 | 61 0d 7d 20 53 63 72 6e |call dat|a.} Scrn|
|000062c0| 43 74 6c 3b 0d 0d 74 79 | 70 65 64 65 66 20 73 74 |Ctl;..ty|pedef st|
|000062d0| 72 75 63 74 20 7b 0d 09 | 73 68 6f 72 74 20 73 70 |ruct {..|short sp|
|000062e0| 44 72 76 72 48 77 3b 09 | 09 2f 2f 20 53 6c 6f 74 |DrvrHw;.|.// Slot|
|000062f0| 20 4d 61 6e 61 67 65 72 | 20 49 44 0d 09 73 68 6f | Manager| ID..sho|
|00006300| 72 74 20 73 6c 6f 74 3b | 09 09 09 2f 2f 20 4e 75 |rt slot;|...// Nu|
|00006310| 6d 62 65 72 20 6f 66 20 | 73 6c 6f 74 0d 09 6c 6f |mber of |slot..lo|
|00006320| 6e 67 20 64 43 74 6c 44 | 65 76 42 61 73 65 3b 09 |ng dCtlD|evBase;.|
|00006330| 2f 2f 20 53 74 61 72 74 | 20 6f 66 20 64 65 76 69 |// Start| of devi|
|00006340| 63 65 27 73 20 61 64 64 | 72 65 73 73 20 73 70 61 |ce's add|ress spa|
|00006350| 63 65 0d 09 73 68 6f 72 | 74 20 6d 6f 64 65 3b 09 |ce..shor|t mode;.|
|00006360| 09 09 2f 2f 20 73 63 72 | 65 65 6e 20 63 68 61 72 |..// scr|een char|
|00006370| 61 63 74 65 72 69 73 74 | 69 63 73 0d 09 73 68 6f |acterist|ics..sho|
|00006380| 72 74 20 66 6c 61 67 4d | 61 73 6b 3b 09 09 2f 2f |rt flagM|ask;..//|
|00006390| 20 57 68 69 63 68 20 66 | 6c 61 67 20 62 69 74 73 | Which f|lag bits|
|000063a0| 20 61 72 65 20 75 73 65 | 64 0d 09 73 68 6f 72 74 | are use|d..short|
|000063b0| 20 66 6c 61 67 73 3b 09 | 09 2f 2f 20 64 65 76 69 | flags;.|.// devi|
|000063c0| 63 65 20 73 74 61 74 65 | 3a 20 62 69 74 20 30 20 |ce state|: bit 0 |
|000063d0| 3d 20 30 20 3d 20 6d 6f | 6e 6f 3b 20 62 69 74 20 |= 0 = mo|no; bit |
|000063e0| 30 20 3d 20 31 20 3d 20 | 63 6f 6c 6f 72 3b 0d 09 |0 = 1 = |color;..|
|000063f0| 09 09 09 09 09 2f 2f 20 | 62 69 74 20 31 31 20 3d |.....// |bit 11 =|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.